package com.ss.android.article.base.feature.feed.vh;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

import com.bytedance.common.utility.Logger;
import com.bytedance.common.utility.UIUtils;
import com.ss.android.account.Spipe;
import com.ss.android.account.e.AccountAnimatorHelper;
import com.ss.android.action.ArticleActionHelper;
import com.ss.android.action.a.a.Comment;
import com.ss.android.article.base.app.AppData;
import com.ss.android.article.base.feature.app.b.DBHelper;
import com.ss.android.article.base.feature.c.FeedItemBehavior;
import com.ss.android.article.base.feature.e.ArticleShareHelper;
import com.ss.android.article.base.feature.favorite.FavoriteActivity;
import com.ss.android.article.base.feature.feed.activity.InfoLayout;
import com.ss.android.article.base.feature.feed.k;
import com.ss.android.article.base.feature.feed.m;
import com.ss.android.article.base.feature.model.Article;
import com.ss.android.article.base.feature.model.MediaInfo;
import com.ss.android.article.base.feature.pgc.PgcActivity;
import com.ss.android.article.base.feature.video.IVideoController;
import com.ss.android.article.base.feature.video.IVideoController.IPlayCompleteListener;
import com.ss.android.article.base.feature.video.IVideoController.IShareListener;
import com.ss.android.article.base.feature.video.cache.VideoCacheController;
import com.ss.android.article.base.ui.BaseActionDialog;
import com.ss.android.article.base.ui.DiggAnimationView;
import com.ss.android.article.base.ui.DiggLayout;
import com.ss.android.article.base.ui.DrawableButton;
import com.ss.android.article.base.ui.ForeGroundImageView;
import com.ss.android.article.base.utils.ArticleHelper;
import com.ss.android.article.base.utils.JSONObjectWrapper;
import com.ss.android.common.applog.AppLog;
import com.ss.android.common.callback.CallbackCenter;
import com.ss.android.common.callback.SSCallback;
import com.ss.android.common.dialog.AlertDialog;
import com.ss.android.common.lib.MobClickCombiner;
import com.ss.android.common.ui.view.AlphaImageView;
import com.ss.android.common.util.NetworkStatusMonitor;
import com.ss.android.common.util.NetworkUtils;
import com.ss.android.common.util.ToolUtils;
import com.ss.android.image.AvatarLoader;
import com.ss.android.image.model.ImageInfo;
import com.ss.android.model.AbsArticle;
import com.ss.android.model.f;
import com.ss.android.newmedia.BaseAppData;
import com.ss.android.newmedia.BatchActionService;
import com.ss.android.newmedia.a.PopupToast;
import com.ss.android.newmedia.a.TimeFormatter;
import com.ss.android.newmedia.util.AppUtil;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.Iterator;
import java.util.concurrent.atomic.AtomicBoolean;

public final class FeedVideoViewHolder extends BaseFeedVideoViewHolder implements k {
    public Article mArticle;
    public AvatarLoader mLargeItemAvatarLoader;
    public AvatarLoader mOneOrThreeItemAvatarLoader;
    private final View.OnClickListener bA = new View.OnClickListener() {

        public final void onClick(View arg4) {
            FeedItemBehavior.handlePopIconClick(aS, arg4, 0);
        }
    };
    private final View.OnClickListener bB = new View.OnClickListener() {
        public final void onClick(View view) {
            FeedItemBehavior.handleMoreActionClick(aS, view, new Object[0]);
        }
    };
    private final View.OnClickListener mDeleteOnClickListener = new View.OnClickListener() {
        public final void onClick(View view) {
            onDeleteClick();
        }
    };
    private final View.OnClickListener bD = new View.OnClickListener() {

        public final void onClick(View view) {
            Article v3 = mArticle;
            int v0 = mArticle.entityFollowed == 0 ? 1 : 0;
            v3.entityFollowed = v0;
            boolean v0_1 = mArticle.entityFollowed > 0 ? true : false;
            mEntityLike.setSelected(v0_1);
            TextView v3_1 = mEntityLike;
            int v2 = v0_1 ? com.ss.android.article.browser.R.string.liked : com.ss.android.article.browser.R.string.like;
            v3_1.setText(v2);
            Context v3_2 = mContext;
            Article v4 = mArticle;
            Spipe v2_1 = Spipe.inst();
            if (v3_2 != null && v4 != null) {
                JSONObject v5 = new JSONObject();
                try {
                    if (v2_1.isLogin) {
                        v5.put("uid_type", "12");
                        v5.put("uid", String.valueOf(v2_1.userId));
                    } else {
                        v5.put("uid_type", "14");
                        v5.put("uid", String.valueOf(AppLog.deviceId()));
                    }

                    v5.put("entity_id", String.valueOf(v4.entityId));
                    v5.put("entity_full_name", v4.entityWord);
                    v5.put("entity_name", v4.entityWord);
                    v5.put("like_status", String.valueOf(v4.entityFollowed));
                } catch (JSONException v2_2) {
                    v2_2.printStackTrace();
                }

                com.ss.android.model.f v2_3 = new f(1, String.valueOf(v4.entityId), System.currentTimeMillis());
                v2_3.mEentityJson = v5.toString();
                v2_3.mRequestMethod = 1;
                v2_3.mUrl = h;
                DBHelper.getInstance(v3_2).a(v4);
                AppData.getInstance().b(v2_3);
                try {
                    v3_2.startService(new Intent(v3_2, BatchActionService.class));
                } catch (Throwable v1) {
                }
            }

            Context v1_1 = mContext;
            String v2_4 = "like";
            String v3_3 = v0_1 ? "list_like" : "list_unlike";
            MobClickCombiner.onEvent(v1_1, v2_4, v3_3, mArticle.groupId, 0, x());
        }
    };
    private final View.OnClickListener bE = new View.OnClickListener() {

        public final void onClick(View arg10) {
            MobClickCombiner.onEvent(mContext, "like", "list_click", mArticle.groupId, 0, x());
            String entityScheme = mArticle.entityScheme;
            if (!android.support.design.a.isTextEmpty(entityScheme)) {
                AppUtil.b(mContext, entityScheme);
            }
        }
    };
    private View.OnClickListener bF = new View.OnClickListener() {

        public final void onClick(View view) {
            if (view != null && mArticleShareHelper != null && mArticle != null) {
                JSONObject jsonObject = new JSONObject();
                try {
                    jsonObject.put("source_type", "video");
                    jsonObject.put("section", "list_share");
                    jsonObject.put("fullscreen", "notfullscreen");
                    jsonObject.put("icon_seat", "exposed");
                } catch (JSONException jsonException) {
                }

                mArticleShareHelper.position = "list";
                mArticleShareHelper.fillShareParams(jsonObject);
                int v0_1 = view.getId();
                if (v0_1 == com.ss.android.article.browser.R.id.m6) {
                    mArticleShareHelper.share(1, mArticle);
                    return;
                }

                if (v0_1 == com.ss.android.article.browser.R.id.m5) {
                    mArticleShareHelper.share(3, mArticle);
                    return;
                }

                if (v0_1 == com.ss.android.article.browser.R.id.m7) {
                    mArticleShareHelper.share(2, mArticle);
                }
            }
        }
    };
    private View.OnClickListener bG = new View.OnClickListener() {

        public final void onClick(View arg11) {
            m v8;
            Article v1;
            ArticleShareHelper v0_1;
            int v5 = com.ss.android.article.browser.R.id.switch_video_digg;
            int v7 = com.ss.android.article.browser.R.id.author_video_action;
            long v0 = 0;
            boolean v6 = true;
            if (arg11 != null) {
                int v2 = arg11.getId();
                if (v2 != v5 && v2 != com.ss.android.article.browser.R.id.switch_video_bury) {
                    if (v2 == com.ss.android.article.browser.R.id.bury_layout) {
                        a(false, mBuryLayout, mDiggLayout);
                    } else if (v2 == com.ss.android.article.browser.R.id.multi_video_bury_layout) {
                        a(false, mMoreCommentsDiggInfoLayoutHolder.mMultiVideoBuryLayout, mMoreCommentsDiggInfoLayoutHolder.mMultiVideoDiggLayout);
                    } else if (v2 == com.ss.android.article.browser.R.id.digg_layout) {
                        a(true, mBuryLayout, mDiggLayout);
                    } else if (v2 == com.ss.android.article.browser.R.id.multi_video_digg_layout) {
                        a(true, mMoreCommentsDiggInfoLayoutHolder.mMultiVideoBuryLayout, mMoreCommentsDiggInfoLayoutHolder.mMultiVideoDiggLayout);
                    } else if (v2 == com.ss.android.article.browser.R.id.author_video_digg_layout) {
                        a(true, ao, an);
                    } else if (v2 == com.ss.android.article.browser.R.id.author_video_bury_layout) {
                        a(false, ao, an);
                    } else {
                        if (v2 != com.ss.android.article.browser.R.id.cover_action_comment_count
                                && v2 != com.ss.android.article.browser.R.id.video_comment_in_no_digg
                                && v2 != com.ss.android.article.browser.R.id.comment_wrapper
                                && v2 != com.ss.android.article.browser.R.id.comments_wrapper
                                && v2 != com.ss.android.article.browser.R.id.author_video_comment_count
                                && v2 != com.ss.android.article.browser.R.id.switch_video_comment_count) {
                            if (v2 != com.ss.android.article.browser.R.id.video_repost_in_no_digg) {
                                if (v2 == v7 && ba == 4 || v2 == com.ss.android.article.browser.R.id.switch_video_action) {
                                    if (mArticleShareHelper == null) {
                                        return;
                                    }

                                    if (mCellRef == null) {
                                        return;
                                    }

                                    if (mCellRef.article == null) {
                                        return;
                                    }

                                    if (mCellRef != null) {
                                        v0 = mCellRef.adId;
                                    }

                                    mArticleShareHelper.b(mArticle, v0);
                                    return;
                                }

                                if (v2 != com.ss.android.article.browser.R.id.more && v2 != com.ss.android.article.browser.R.id.cover_action_repost) {
                                    if (v2 != v7) {
                                    } else if (ba != 5) {
                                    } else if (mArticleShareHelper == null) {
                                    } else if (mCellRef == null) {
                                    } else if (mCellRef.article != null) {
                                        long v2_1 = mCellRef != null ? mCellRef.adId : v0;
                                        JSONObject v5_1 = new JSONObject();
                                        try {
                                            v5_1.put("source_type", "video");
                                            v5_1.put("section", "list_more");
                                            v5_1.put("fullscreen", "notfullscreen");
                                            v5_1.put("icon_seat", "inside");
                                        } catch (JSONException v7_1) {
                                        }

                                        mArticleShareHelper.position = "list";
                                        mArticleShareHelper.fillShareParams(v5_1);
                                        if (mCellRef != null && mCellRef.article != null && mCellRef.article.videoSubjectId > v0) {
                                            v0_1 = mArticleShareHelper;
                                            v1 = mArticle;
                                            v8 = bg;
                                            v0_1.position = "list";
                                            v0_1.a(v1, v2_1, false, BaseActionDialog.DisplayMode.VIDEO_SUBJECT, true, ArticleShareHelper.u);
                                            v0_1.x = v8;
                                            return;
                                        }

                                        v0_1 = mArticleShareHelper;
                                        v1 = mArticle;
                                        v8 = bg;
                                        v0_1.position = "list";
                                        v0_1.a(v1, v2_1, false, BaseActionDialog.DisplayMode.VIDEO_MORE_WITH_DIGG, true, ArticleShareHelper.u);
                                        v0_1.x = v8;
                                    } else {
                                    }

                                    return;
                                }

                                if (mArticleShareHelper == null) {
                                    return;
                                }

                                if (mCellRef == null) {
                                    return;
                                }

                                if (mCellRef.article == null) {
                                    return;
                                }

                                if (mCellRef != null) {
                                    v0 = mCellRef.adId;
                                }

                                mArticleShareHelper.a(mArticle, v0);
                            } else if (mArticleShareHelper == null) {
                            } else if (mCellRef == null) {
                            } else if (mCellRef.article != null) {
                                if (mCellRef != null) {
                                    v0 = mCellRef.adId;
                                }

                                mArticleShareHelper.a(mArticle, v0, false);
                            } else {
                            }

                            return;
                        }

                        BaseFeedVideoViewHolder.a(mContext, mCellRef);
                        mAppData.h(mCellRef.category);
                        if (mArticle == null || mArticle.commentCount != 0) {
                            FeedItemBehavior.handleItemClick(aS, arg11, new Object[]{Boolean.valueOf(true)});
                        } else {
                            FeedItemBehavior.handleItemClick(aS, arg11, new Object[]{Boolean.valueOf(true), Boolean.valueOf(true)});
                        }

                        a("video_list_enter_comment");
                    }

                    return;
                }

                if (v2 != v5) {
                    v6 = false;
                }

                a(v6, mSwitchVideoBury, mSwitchVideoDigg);
            }
        }
    };
    private final View.OnClickListener bH = new View.OnClickListener() {

        public final void onClick(View arg4) {
            if ((mCellRef.k()) || mVideoControllerContext == null || mVideoControllerContext.getVideoController() == null) {
                mAppData.h(mCellRef.category);
                BaseFeedVideoViewHolder.a(mContext, mCellRef);
                FeedItemBehavior.handleItemClick(aS, arg4, new Object[0]);
            } else {
                if (mVideoStyle == 9) {
                    UIUtils.setVisibility(mVideoSwitchInfosStub, 0);
                    mDivider.setVisibility(View.GONE);
                    w();
                    FeedVideoViewHolder.b(mRootView);
                }

                mAppData.a(mCellRef.category, mCellRef.cellId);
                onPlayIconClick();
                if (!mAppData.getAbSettings().isVideoListShare()) {
                    return;
                }

                if (be) {
                    return;
                }

                a(300);
                be = true;
            }
        }
    };
    private IPlayCompleteListener mPlayCompleteListener = new IPlayCompleteListener() {

        public final void onItemShare(int channel) {
            if (channel > 0) {
                Article v1 = mArticle;
                IVideoController v2 = mVideoControllerContext.getVideoController();
                String v0 = "notfullscreen";
                if (v2 != null) {
                    v0 = v2.isFullScreen() ? "fullscreen" : "notfullscreen";
                }

                if (mArticleShareHelper == null) {
                    return;
                }

                if (v1 == null) {
                    return;
                }

                JSONObject v2_1 = new JSONObject();
                try {
                    v2_1.put("source_type", "video");
                    v2_1.put("section", "list_video_over");
                    v2_1.put("fullscreen", v0);
                    v2_1.put("icon_seat", "exposed");
                } catch (JSONException v0_1) {
                }

                mArticleShareHelper.fillShareParams(v2_1);
                mArticleShareHelper.position = "list";
                mArticleShareHelper.share(channel, v1);
            }
        }

        public final void onReplay() {
        }

        public final void onShare() {
            a(false);
        }
    };
    private IShareListener mShareListener = new IShareListener() {

        public final void onFullScreenMoreClick() {
            if (mArticleShareHelper != null) {
                JSONObject jsonObject = new JSONObject();
                try {
                    jsonObject.put("source_type", "video");
                    jsonObject.put("section", "player_more");
                    jsonObject.put("fullscreen", "fullscreen");
                    jsonObject.put("icon_seat", "inside");
                } catch (JSONException jsonException) {
                }

                mArticleShareHelper.fillShareParams(jsonObject);
                mArticleShareHelper.position = "list";
                a(true);
            }
        }

        public final void onTopMoreClick() {
        }
    };
    int ba;
    public ArticleShareHelper mArticleShareHelper;
    int bc;
    int mVideoStyle;
    public boolean be = false;
    public int bf = 0;
    final m bg = new m(this);
    private DiggAnimationView bh;
    private PopupToast bi;
    private AtomicBoolean bj;
    private boolean mShowListDigg;
    private boolean bl = false;
    private boolean bm;
    private boolean bn;
    private boolean bo;
    private boolean bp;
    private int mFeedItemHorizontalMargin;
    private int br;
    private int bs;
    private View.OnClickListener bt = new View.OnClickListener() {

        public final void onClick(View view) {
            if (!android.support.design.a.isTextEmpty(mCellRef.sourceOpenUrl)) {
                AppUtil.b(mContext, mCellRef.sourceOpenUrl);
            }
        }
    };
    private View.OnClickListener bu = new View.OnClickListener() {

        public final void onClick(View arg12) {
            int v1 = 1;
            long v6 = 0;
            if (mArticle.videoSubjectId <= v6 || (android.support.design.a.isTextEmpty(mCellRef.sourceOpenUrl))) {
                MediaInfo v10 = mArticle.mediaInfo;
                if (v10 != null && v10.id > v6) {
                    int v0 = mCellRef.videoStyle == 7 ? 1 : 0;
                    switch (mCellRef.videoStyle) {
                        case 7: {
                            break;
                        }
                        case 8:
                        case 9:
                        case 12: {
                            v0 = 0;
                            break;
                        }
                        default:
                            PgcActivity.startActivity(mContext, v10.id, mArticle.itemId, "video_feed_author", 0);
                            return;
                    }
                    JSONObjectWrapper v2 = new JSONObjectWrapper();
                    String v3 = "pgc";
                    if (v0 != 0) {
                        v1 = 0;
                    }
                    MobClickCombiner.onEvent(mContext, "video", "feed_enter_pgc", mArticle.groupId, v10.id, v2.put(v3, v1).put("video_subject_id", mArticle.videoSubjectId).jsonObject);
                    PgcActivity.startActivity(mContext, v10.id, mArticle.itemId, "video_feed_author", 0);
                }
            } else {
                MobClickCombiner.onEvent(mContext, "video", "feed_enter_pgc", mArticle.groupId, v6, new JSONObjectWrapper().put("pgc", 0).put("video_subject_id", mArticle.videoSubjectId).jsonObject);
                AppUtil.b(mContext, mCellRef.sourceOpenUrl);
            }
        }
    };
    private View.OnTouchListener bv = new View.OnTouchListener() {

        @TargetApi(value = 11)
        public final boolean onTouch(View arg2, MotionEvent arg3) {
            switch (arg3.getAction()) {
                case 0: {
                    arg2.setAlpha(0.6f);
                    break;
                }
                case 1:
                case 3: {
                    arg2.setAlpha(1f);
                    break;
                }
            }

            return false;
        }
    };
    private SSCallback bw = new SSCallback() {
        public final Object onCallback(Object[] args) {
            Object v8 = null;
            int v7 = 2;
            int v6 = View.GONE;
            long v2 = ((Long) args[1]).longValue();
            Object v0 = args[v7];
            if (mArticle != null && mArticle.groupId == v2) {
                ((AbsArticle.a) v0).a(mArticle);
                if (bc == v7) {
                    switch (ba) {
                        case 1: {
                            if (mDiggInfoLayout != null && mDiggInfoLayout.getVisibility() != v6) {
                                a(mDiggLayout, mBuryLayout);
                                return v8;
                            }
                            return v8;
                        }
                        case 3: {
                            if (mMoreCommentsDiggInfoLayoutHolder.mMoreCommentsDiggInfoLayout != null && mMoreCommentsDiggInfoLayoutHolder.mMoreCommentsDiggInfoLayout.getVisibility() != v6) {
                                a(mMoreCommentsDiggInfoLayoutHolder.mMultiVideoDiggLayout, mMoreCommentsDiggInfoLayoutHolder.mMultiVideoBuryLayout);
                            }
                            return v8;
                        }
                        case 4: {
                            if (mDiggAuthorVideoLayout != null && mDiggAuthorVideoLayout.getVisibility() != v6) {
                                an.setSelected(mArticle.userDigg);
                                ao.setSelected(mArticle.userBury);
                                return v8;

                            }
                            return v8;
                        }
                        case 6: {
                            if (mVideoSwitchInfosStub != null) {
                                a(mSwitchVideoDigg, mSwitchVideoBury);
                                return v8;

                            }
                            return v8;
                        }
                    }

                    return v8;

                }
            }

            return v8;
        }
    };
    private SSCallback bx = new SSCallback() {

        public final Object onCallback(Object[] args) {
            Object v4 = null;
            if (args != null && args.length >= 3) {
                try {
                    int v0_1 = ((Integer) args[0]).intValue();
                    Object v1 = args[1];
                    if (args[2] != mArticleShareHelper) {
                        return v4;
                    }

                    String v2 = "xiangping";
                    switch (v0_1) {
                        case 1: {
                            if (v1 != mArticle) {
                                return v4;
                            }
                            MobClickCombiner.onEvent(mContext, v2, "video_list_favorite");
                            CallbackCenter.abortDispatch();
                            return v4;
                        }
                        case 2: {
                            if (v1 != mArticle) {
                                return v4;
                            }

                            MobClickCombiner.onEvent(mContext, v2, "video_list_unfavorite");
                            CallbackCenter.abortDispatch();
                            return v4;
                        }
                        case 3: {
                            if (mArticle.mediaInfo != v1) {
                                return v4;
                            }

                            MobClickCombiner.onEvent(mContext, v2, "video_list_pgc_button");
                            CallbackCenter.abortDispatch();
                            return v4;
                        }
                    }

                    return v4;
                } catch (Exception v0) {
                    if (!Logger.debug()) {
                        return v4;
                    }

                    v0.printStackTrace();
                }
            }

            return v4;
        }
    };
    private final View.OnClickListener by = new View.OnClickListener() {

        public final void onClick(View view) {
            FeedItemBehavior.handleCommentClick(aS, view);
        }
    };
    private View.OnClickListener bz = new View.OnClickListener() {

        public final void onClick(View view) {
            BaseFeedVideoViewHolder.a(mContext, mCellRef);
            mAppData.h(mCellRef.category);
            FeedItemBehavior.handleItemClick(aS, view, new Object[0]);
        }
    };

    public FeedVideoViewHolder(Context context,
                               NetworkStatusMonitor networkStatusMonitor,
                               FeedItemBehavior feedItemBehavior,
                               ArticleActionHelper articleActionHelper,
                               int arg7,
                               TimeFormatter timeFormatter,
                               int arg9,
                               int arg10,
                               AtomicBoolean arg11,
                               PopupToast popupToast,
                               DiggAnimationView diggAnimationView) {
        super(context, networkStatusMonitor, feedItemBehavior, articleActionHelper, arg7, timeFormatter, arg9, arg10);
        this.bj = arg11;
        this.bi = popupToast;
        this.bh = diggAnimationView;
        if (this.mAppData != null) {
            this.mShowListDigg = this.mAppData.showListDigg();
        }

        this.mFeedItemHorizontalMargin = this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.feed_item_horizontal_margin);
    }

    private void A() {
        View v0_1;
        int v0;
        int v14 = -3;
        int v13 = View.GONE;
        View.OnClickListener v12 = null;
        if (this.bc == 2) {
            if (UIUtils.isVisible(this.mTopSourceLayout)) {
                UIUtils.setVisibility(this.mTopSourceLayout, v13);
                this.mTopSourceLayout.setOnClickListener(v12);
                this.mLargeItemAvatarLoader.clear(this.mTopSourceIcon);
                if (this.mAppData.getAppSettings().isVideoCellChange()) {
                    UIUtils.setLayoutMargins(this.mTitle, v14, ((int) UIUtils.dp2px(this.mContext, 10f)), v14, v14);
                } else {
                    UIUtils.setLayoutMargins(this.mTitle, v14, this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.eh), v14, v14);
                }
            }

            if (this.mVideoCoverLayout != null && this.mVideoCoverLayout.getVisibility() == View.VISIBLE) {
                this.mVideoCoverLayout.setVisibility(v13);
                this.mVideoCoverLayout.setBackgroundColor(ContextCompat.getColor(this.mContext, com.ss.android.article.browser.R.color.video_cover_layout_background));
            }

            if (this.mVideoCoverLayoutCoverSourceTv != null) {
                this.mVideoCoverLayoutCoverSourceTv.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
            }

            if (this.mVideoStyle == 5) {
                this.mMoreCommentsDiggInfoLayoutHolder.mMoreCommentsDiggInfoLayout.setVisibility(v13);
                this.mVideoCoverLayoutCoverTitle.setVisibility(View.VISIBLE);
                MoreCommentsDiggInfoLayoutHolder moreCommentsDiggInfoLayoutHolder = this.mMoreCommentsDiggInfoLayoutHolder;
                moreCommentsDiggInfoLayoutHolder.mMultiVideoDiggLayout.setOnClickListener(v12);
                moreCommentsDiggInfoLayoutHolder.mCommentWrapper.setOnClickListener(v12);
                moreCommentsDiggInfoLayoutHolder.mMore.setOnClickListener(v12);
                moreCommentsDiggInfoLayoutHolder.mMultiVideoBuryLayout.setOnClickListener(v12);
                moreCommentsDiggInfoLayoutHolder.mDividerSpace.setVisibility(View.VISIBLE);
                moreCommentsDiggInfoLayoutHolder.mDividerLine.setVisibility(View.VISIBLE);
                v0 = moreCommentsDiggInfoLayoutHolder.mCommentsWrapper.getChildCount();
                if (v0 > 0) {
                    int v1;
                    for (v1 = v0 - 1; v1 >= 0; --v1) {
                        v0_1 = moreCommentsDiggInfoLayoutHolder.mCommentsWrapper.getChildAt(v1);
                        moreCommentsDiggInfoLayoutHolder.mCommentsWrapper.removeViewAt(v1);
                        MoreCommentsDiggInfoLayoutHolder.l.add(v0_1);
                    }

                    moreCommentsDiggInfoLayoutHolder.k.clear();
                }
            }

            if (this.mVideoControllerContext != null) {
                IVideoController controller = this.mVideoControllerContext.getVideoController();
                if (controller != null) {
                    Object v0_2 = controller.getBindedTag();
                    if (((v0_2 instanceof Article)) && v0_2 == this.mArticle) {
                        if (AppData.getInstance().getAbSettings().isFixLoadMore()) {
                            int v3_1;
                            if (this.mRootView == null || this.mRootView.getParent() == null) {
                                v3_1 = 1;
                            } else {
                                ViewParent v0_3 = this.mRootView.getParent();
                                int v7 = ((ListView) v0_3).getChildCount();
                                int v8 = ((ListView) v0_3).getTop();
                                int v9 = ((ListView) v0_3).getBottom();
                                int v5 = 0;
                                int v1;
                                for (v3_1 = 1; v5 < v7; v3_1 = v1) {
                                    View v10 = ((ListView) v0_3).getChildAt(v5);
                                    v1 = v10 == null
                                            || v10.getTag() == null
                                            || !(v10.getTag() instanceof FeedVideoViewHolder)
                                            || ((FeedVideoViewHolder) v10.getTag()).mArticle != this.mArticle
                                            || v10.getTop() < v8
                                            || v10.getBottom() > v9 ? v3_1 : 0;
                                    ++v5;
                                }
                            }

                            if (this.mRootView != null && this.mRootView.getParent() != null) {
                                v0_1 = ((ViewGroup) this.mRootView.getParent()).getChildAt(0);
                                if (v0_1 != null && !(v0_1.getTag() instanceof FeedVideoViewHolder) && v0_1.getVisibility() == View.VISIBLE) {
                                    v3_1 = 1;
                                }
                            }

                            if (v3_1 == 0) {
                            } else {
                                controller.dismiss(true);
                            }
                        } else {
                            controller.dismiss(true);
                        }
                    }
                }
            }

            if (this.mLargeImageLayout != null) {
                if ((this.bn) || this.mVideoStyle == 5) {
                    ViewGroup.LayoutParams v0_4 = this.mLargeImageLayout.getLayoutParams();
                    ((ViewGroup.MarginLayoutParams) v0_4).leftMargin = this.mFeedItemHorizontalMargin;
                    ((ViewGroup.MarginLayoutParams) v0_4).rightMargin = this.mFeedItemHorizontalMargin;
                    ((ViewGroup.MarginLayoutParams) v0_4).topMargin = this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.ec);
                }

                this.mLargeImageLayout.setVisibility(v13);
                this.mLargeImageLayout.setOnClickListener(v12);
                this.mLargeImageLayout.setClickable(false);
                this.mRelatedVideoContainer.setVisibility(v13);
            }

            if (this.ba == 0) {
                this.mInfoLayout.b();
                this.mInfoLayout.setVisibility(v13);
                ((ViewGroup.MarginLayoutParams) this.mInfoLayout.getLayoutParams()).topMargin = this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.feed_info_layout_title_gap);
            } else if (this.ba == 1) {
                if (this.mDiggInfoLayout != null) {
                    this.mDiggInfoLayout.setVisibility(v13);
                    this.mDiggLayout.setOnClickListener(v12);
                    this.mBuryLayout.setOnClickListener(v12);
                    this.mCoverActionCommentCount.setOnClickListener(v12);
                    this.mCoverActionRepost.setOnClickListener(v12);
                }
            } else if (this.ba == 2) {
                this.mNoDiggInfoLayout.setVisibility(v13);
                this.mVideoCommentInNoDigg.setOnClickListener(v12);
                this.mVideoRepostInNoDigg.setOnClickListener(v12);
            } else {
                if (this.ba != 5 && this.ba != 4) {
                    if (this.ba == 6) {
                        this.mVideoSwitchInfosStub.setVisibility(v13);
                        this.mLargeItemAvatarLoader.clear(this.mSwichAvatar);
                        this.mDivider.setVisibility(View.VISIBLE);
                        UIUtils.setLayoutMargins(this.mDivider, this.mFeedItemHorizontalMargin, v14, this.mFeedItemHorizontalMargin, v14);
                        UIUtils.setLayoutParams(this.mDivider, v14, ((int) UIUtils.dp2px(this.mContext, 0.5f)));
                        this.mDivider.setBackgroundResource(com.ss.android.article.browser.R.color.divider);
                        this.mVideoSwitchSoiurceInfosLayout.setVisibility(v13);
                        this.mVideoCoverLayoutCoverTitle.setTextSize(17f);
                        this.mVideoCoverLayoutCoverTitle.setLineSpacing(0f, 1f);
                        this.mSwitchSource.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
                    } else {
                    }
                } else {
                    this.mDiggAuthorVideoLayout.setVisibility(v13);
                    this.ar.setOnClickListener(v12);
                    this.ap.setOnClickListener(v12);
                    this.ao.setOnClickListener(v12);
                    this.an.setOnClickListener(v12);
                    this.ah.setOnClickListener(v12);
                    this.mDiggAuthorAuthorName.setOnClickListener(v12);
                    this.am.setOnClickListener(v12);
                    this.aJ.setOnClickListener(v12);
                    this.aH.setOnClickListener(v12);
                    this.aI.setOnClickListener(v12);
                    this.mVideoCoverLayoutCoverTitle.setTextSize(17f);
                    this.mVideoCoverLayoutCoverTitle.setTextColor(ContextCompat.getColorStateList(this.mContext, com.ss.android.article.browser.R.color.article_video_cover_txt_color));
                    UIUtils.setLayoutMargins(this.mDivider, this.mFeedItemHorizontalMargin, v14, this.mFeedItemHorizontalMargin, v14);
                    UIUtils.setLayoutParams(this.mDivider, v14, ((int) UIUtils.dp2px(this.mContext, 0.5f)));
                    this.mDivider.setPadding(0, 0, 0, 0);
                    this.mDivider.setImageDrawable(((Drawable) v12));
                    this.mDivider.setBackgroundResource(com.ss.android.article.browser.R.color.divider);
                }
            }

            UIUtils.setVisibility(this.mLargeImageLayoutLargeImageVideoPlay, v13);
            if (!this.bo || this.mVideoStyle != 2) {
                if (this.mLargeVideoTime != null && this.mLargeVideoTime.getVisibility() == View.VISIBLE) {
                    String v0_6 = this.mLargeVideoTime.getText();
                    if (v0_6 == null || ((CharSequence) v0_6).length() == 0) {
                        this.mLargeVideoTime.a(com.ss.android.article.base.feature.app.a.b.j, false);
                    }

                    UIUtils.setVisibility(this.mLargeVideoTime, v13);
                }
            } else if (this.mLargeVideoTime != null && this.mLargeVideoTime.getVisibility() == View.VISIBLE) {
                UIUtils.setVisibility(this.mLargeVideoTime, v13);
                DrawableButton v0_5 = this.mLargeVideoTime;
                Context v1_1 = this.mContext;
                AppData.isNightMode();
                v0_5.setDrawable(ContextCompat.getDrawable(v1_1, com.ss.android.article.browser.R.drawable.palyicon_video_textpage), false);
            }

            if (this.mLargeButtonAd != null && this.mLargeButtonAd.getVisibility() == View.VISIBLE) {
                this.mLargeButtonAd.d();
            }

            if (this.mVideoCoverLayoutCoverButtonAd != null && this.mVideoCoverLayoutCoverButtonAd.getVisibility() == View.VISIBLE) {
                this.mVideoCoverLayoutCoverButtonAd.d();
            }

            if (this.mDiggAuthorAdAvatarTv != null && this.mDiggAuthorAdAvatarTv.getVisibility() == View.VISIBLE) {
                UIUtils.setVisibility(this.mDiggAuthorAdAvatarTv, v13);
            }

            if (this.at != null && this.at.getVisibility() == View.VISIBLE) {
                this.at.d();
            }

            if (!this.bn) {
                return;
            }

            this.a(this.ba, false);
            if (this.mAbstractCommentLayout != null && this.mAbstractCommentLayout.getVisibility() == View.VISIBLE) {
                ((ViewGroup.MarginLayoutParams) this.mAbstractCommentLayout.getLayoutParams()).bottomMargin =
                        this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.feed_item_vertical_margin);
            }

            if (this.mAbstractCommentContent == null) {
                return;
            }

            if (this.mAbstractCommentContent.getVisibility() != View.VISIBLE) {
                return;
            }

            v0 = this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.e5);
            this.mAbstractCommentContent.setPadding(v0, v0, v0, this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.a0));
            TextView v0_7 = this.mAbstractCommentContent;
            AppData.isNightMode();
            v0_7.setBackgroundResource(com.ss.android.article.browser.R.drawable.cq);
        }
    }

    private void B() {
        int v3 = 2;
        int v2 = View.GONE;
        boolean v0 = false;
        if (this.mArticle.entityStyle > 0 && this.mArticle.entityStyle <= v3 && (this.bc != v3 || this.ba == 0)) {
            this.initEntityLayout();
            this.mEntityLayout.setVisibility(View.VISIBLE);
            switch (this.mArticle.entityStyle) {
                case 1: {
                    this.mEntityDivider.setVisibility(v2);
                    this.mEntityLike.setVisibility(v2);
                    this.mEntityArrow.setVisibility(View.VISIBLE);
                    break;
                }
                case 2: {
                    this.mEntityDivider.setVisibility(View.VISIBLE);
                    this.mEntityLike.setVisibility(View.VISIBLE);
                    this.mEntityArrow.setVisibility(v2);
                    if (this.mArticle.entityFollowed > 0) {
                        v0 = true;
                    }

                    this.mEntityLike.setSelected(v0);
                    TextView v1 = this.mEntityLike;
                    int v0_1 = v0 ? com.ss.android.article.browser.R.string.liked : com.ss.android.article.browser.R.string.like;
                    v1.setText(v0_1);
                    this.mEntityLike.setOnClickListener(this.bD);
                    break;
                }
            }

            if (!this.FeedItemBehavior.hasSendAction(1, this.mCellRef)) {
                MobClickCombiner.onEvent(this.mContext, "like", "list_show", this.mArticle.groupId, 0, this.x());
                this.FeedItemBehavior.setSendActionState(1, this.mCellRef, true);
            }

            Context v0_2 = this.mContext;
            String v1_1 = this.mArticle.entityText;
            int[] v2_1 = this.mArticle.entityMark;
            AppData.isNightMode();
            this.mEntityDesc.setText(a(v0_2, v1_1, v2_1, com.ss.android.article.browser.R.color.update_comment_more_text_selector));
            this.mEntityLayout.setOnClickListener(this.bE);
        }
    }

    private void a(int arg9, boolean arg10) {
        View[] v2;
        int v4 = 2;
        int v1 = 0;
        View[] v0 = null;
        if (arg9 == 1) {
            v0 = new View[v4];
            v0[0] = this.mDiggLayout;
            v0[1] = this.mBuryLayout;
            v2 = v0;
        } else if (arg9 == v4) {
            v0 = new View[4];
            v0[0] = this.mVideoSourceInNoDigg;
            v0[1] = this.mVideoDurationInNoDigg;
            v0[v4] = this.mVideoCommentInNoDigg;
            v0[3] = this.mVideoRepostInNoDigg;
            v2 = v0;
        } else {
            v2 = v0;
        }

        if (v2 != null) {
            int v0_1 = arg10 ? this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.iw)
                    : this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.iv);
            int v3 = v2.length;
            while (v1 < v3) {
                View v4_1 = v2[v1];
                if (v4_1 != null) {
                    v4_1.setPadding(v4_1.getPaddingLeft(), v4_1.getPaddingTop(), v4_1.getPaddingRight(), v0_1);
                }

                ++v1;
            }
        }
    }

    private void a(View arg3, int arg4) {
        if (arg3 != null && this.mContext != null) {
            if (this.bi == null) {
                this.bi = new PopupToast(this.mContext);
            }

            this.bi.showToast(com.ss.android.article.browser.R.drawable.close_popup_textpage, arg4);
        }
    }

    public final void a(int arg18) {
        boolean v6 = ToolUtils.isAppInstalled(this.mContext, "com.tencent.mobileqq");
        AlphaImageView v3 = this.aH;
        int v2 = v6 ? 0 : 8;
        UIUtils.setVisibility(v3, v2);
        int v5 = v6 ? 82 : 43;
        int v4 = v6 ? 43 : 4;
        int v3_1 = v6 ? 114 : 75;
        v2 = v6 ? 4 : 0;
        UIUtils.setVisibility(this.aI, 0);
        UIUtils.setVisibility(this.aG, 0);
        UIUtils.setVisibility(this.aJ, 0);
        Animator v6_1 = AccountAnimatorHelper.createFadeOutAnimation(this.mDiggAuthorVideoAuthorAvatar);
        Animator v7 = AccountAnimatorHelper.createFadeOutAnimation(this.mDiggAuthorAuthorName);
        Animator v8 = AccountAnimatorHelper.createFadeInAnimation(this.aG);
        Animator v9 = AccountAnimatorHelper.createFadeInAnimation(this.aH);
        Animator v10 = AccountAnimatorHelper.createFadeInAnimation(this.aI);
        Animator v11 = AccountAnimatorHelper.createFadeInAnimation(this.aJ);
        Animator v3_2 = AccountAnimatorHelper.createTranslationXAnimator(this.aG, 0, -(((int) UIUtils.dp2px(this.mContext, ((float) v3_1)))));
        Animator v2_1 = AccountAnimatorHelper.createTranslationXAnimator(this.aH, 0, -(((int) UIUtils.dp2px(this.mContext, ((float) v2)))));
        Animator v5_1 = AccountAnimatorHelper.createTranslationXAnimator(this.aI, 0, -(((int) UIUtils.dp2px(this.mContext, ((float) v5)))));
        Animator v4_1 = AccountAnimatorHelper.createTranslationXAnimator(this.aJ, 0, -(((int) UIUtils.dp2px(this.mContext, ((float) v4)))));
        this.br = this.an.getLeft();
        this.bs = this.ap.getLeft();
        Animator v12 = AccountAnimatorHelper.createTranslationXAnimator(this.an, 0, (((int) UIUtils.dp2px(this.mContext, 15f))) - this.br);
        Animator v13 = AccountAnimatorHelper.createTranslationXAnimator(this.ap, 0, (((int) UIUtils.dp2px(this.mContext, 76f))) - this.bs);
        AnimatorSet animatorSet = new AnimatorSet();
        animatorSet.playTogether(new Animator[]{v6_1, v7, v8, v9, v10, v11, v3_2, v2_1, v5_1, v4_1, v12, v13});
        animatorSet.setInterpolator(android.support.design.a.a(0.32f, 0.94f, 0.6f));
        animatorSet.setDuration(((long) arg18));
        animatorSet.start();
    }

    protected final void a(InfoLayout.Info info) {
        if (this.mCellRef.p()) {
            info.a |= 16;
            info.j = this.mCellRef.sourceIcon;
        } else {
            super.a(info);
        }
    }

    public final void a(DiggLayout arg2, DiggLayout arg3) {
        if (arg2 != null) {
            arg2.setText(android.support.design.a.c(this.mArticle.diggCount));
            arg2.setSelected(this.mArticle.userDigg);
        }

        if (arg3 != null) {
            arg3.setText(android.support.design.a.c(this.mArticle.buryCount));
            arg3.setSelected(this.mArticle.userBury);
        }
    }

    final void a(String arg10) {
        long v4 = 0;
        if (this.mContext != null && !android.support.design.a.isTextEmpty(arg10)) {
            if (this.mArticle != null && this.mArticle.videoSubjectId > v4) {
                MobClickCombiner.onEvent(this.mContext, "xiangping", arg10, v4, v4, new JSONObjectWrapper().put("video_subject_id", this.mArticle.videoSubjectId).jsonObject);
                return;
            }

            MobClickCombiner.onEvent(this.mContext, "xiangping", arg10);
        }
    }

    final void a(boolean arg7) {
        Article v0 = this.mArticle;
        if (this.mArticleShareHelper != null && v0 != null) {
            if (arg7) {
                this.mArticleShareHelper.b(v0, null, this.mCellRef.adId);
            } else {
                this.mArticleShareHelper.a(v0, this.mCellRef.adId, true);
            }
        }
    }

    final void a(boolean arg13, DiggLayout arg14, DiggLayout arg15) {
        int v2;
        int v4 = 2;
        DiggLayout v0 = arg13 ? arg15 : arg14;
        if (this.mArticle.userDigg) {
            this.a(((View) v0), com.ss.android.article.browser.R.string.ss_hint_digg);
        } else if (this.mArticle.userBury) {
            this.a(((View) v0), com.ss.android.article.browser.R.string.ss_hint_bury);
        } else {
            String v0_1 = arg13 ? "video_list_digg" : "video_list_bury";
            this.a(v0_1);
            long v0_2 = 0;
            if (this.mCellRef != null && this.mCellRef.article == this.mArticle) {
                v0_2 = this.mCellRef.adId;
            }

            Article v7 = this.mArticle;
            if (this.mArticleActionHelper != null && this.mAppData != null && v7 != null) {
                if (arg13) {
                    v7.userDigg = true;
                    ++v7.diggCount;
                    v2 = 1;
                } else {
                    v7.userBury = true;
                    ++v7.buryCount;
                    v2 = v4;
                }

                AbsArticle.a v8 = new AbsArticle.a();
                int v5 = v7.userDigg ? 1 : 0;
                v8.userDigg = v5;
                v8.diggCount = v7.diggCount;
                v5 = v7.userBury ? 1 : 0;
                v8.userBury = v5;
                v8.buryCount = v7.buryCount;
                CallbackCenter.TYPE v5_1 = BaseAppData.callbackTypeSpipeItemStateChanged;
                Object[] v9 = new Object[3];
                v9[0] = BaseAppData.callbackTypeSpipeItemStateChanged;
                v9[1] = Long.valueOf(v7.groupId);
                v9[v4] = v8;
                CallbackCenter.notifyCallback(v5_1, v9);
                this.mArticleActionHelper.a(v2, ((AbsArticle) v7), v0_2);
            }

            v0 = arg13 ? arg15 : arg14;
            if (this.mArticle == null) {
                return;
            }

            if (arg14 == null) {
                return;
            }

            if (arg15 == null) {
                return;
            }

            if (v0 == null) {
                return;
            }

            if (arg14 == this.ao || arg15 == this.an) {
                v0.onDiggClick();
            } else {
                arg15.setText(android.support.design.a.c(this.mArticle.diggCount));
                arg14.setText(android.support.design.a.c(this.mArticle.buryCount));
                v0.onDiggClick();
            }

            arg15.setSelected(this.mArticle.userDigg);
            arg14.setSelected(this.mArticle.userBury);
        }
    }

    static void b(View arg9) {
        int v8 = -3;
        if (arg9 != null && ((arg9.getParent() instanceof ListView))) {
            ViewParent v0 = arg9.getParent();
            if (((ListView) v0).getChildCount() > 1) {
                int v4 = ((ListView) v0).getChildCount();
                int v2;
                for (v2 = 0; v2 < v4; ++v2) {
                    View v1 = ((ListView) v0).getChildAt(v2);
                    if (v1 != arg9 && v1 != null && ((v1.getTag() instanceof ArticleFeedViewHolder))) {
                        Object v1_1 = v1.getTag();
                        if (((ArticleFeedViewHolder) v1_1).mVideoSwitchInfosLayout != null && ((ArticleFeedViewHolder) v1_1).mVideoSwitchInfosLayout.getVisibility() == View.VISIBLE) {
                            ((ArticleFeedViewHolder) v1_1).mVideoSwitchInfosLayout.setVisibility(View.GONE);
                            ((ArticleFeedViewHolder) v1_1).mDivider.setVisibility(View.VISIBLE);
                            UIUtils.setLayoutMargins(((ArticleFeedViewHolder) v1_1).mDivider, 0, v8, 0, v8);
                            UIUtils.setLayoutParams(((ArticleFeedViewHolder) v1_1).mDivider, v8, ((int) UIUtils.dp2px(((ArticleFeedViewHolder) v1_1).context, 2f)));
                            ((ArticleFeedViewHolder) v1_1).mDivider.setBackgroundResource(com.ss.android.article.browser.R.color.ssxinmian4);
                        }
                    }
                }
            }
        }
    }

    protected final void b(InfoLayout.Info arg4) {
        if (!(this.mContext instanceof FavoriteActivity)) {
            String v1 = null;
            int v0 = 0;
            if (this.mArticle == null || !this.mArticle.userRepin) {
                super.b(arg4);
                if ((arg4.a & 32) > 0) {
                    return;
                } else if (!this.j()) {
                    return;
                } else if (this.mCellRef.isRecommend()) {
                    v1 = this.mContext.getResources().getString(com.ss.android.article.browser.R.string.recommend_article);
                    v0 = 11;
                } else if (this.mCellRef.isHot()) {
                    v1 = this.mContext.getResources().getString(com.ss.android.article.browser.R.string.hot_article);
                    v0 = 10;
                }
            } else {
                v1 = this.mContext.getResources().getString(com.ss.android.article.browser.R.string.collected_article);
                v0 = 12;
            }

            if (android.support.design.a.isTextEmpty(v1)) {
                return;
            }

            arg4.a |= 32;
            arg4.c = v1;
            arg4.labelStyle = v0;
        }
    }

    public final boolean d() {
        return this.bl;
    }

    public final void e() {
        this.bl = false;
    }

    public final void loadImage() {
        if (this.bc == 2) {
            ImageInfo imageInfo = ArticleHelper.getImageInfoTag(this.mLargeImageLayoutLargeImageIv);
            if (imageInfo != null) {
                if (this.mCellRef.f()) {
                    this.mVideoCoverLayoutCoverTopShadow.setVisibility(View.VISIBLE);
                }
                android.support.design.a.setImage(this.mLargeImageLayoutLargeImageIv, imageInfo);
                this.mLargeImageLayoutLargeImageIv.setTag(com.ss.android.article.browser.R.id.image_info, null);
            }
        }

        if (this.mLargeImageLayoutLargeImageIv != null) {
            this.mLargeImageLayoutLargeImageIv.post(new Runnable() {
                public final void run() {
                    VideoCacheController.getInstance().tryPreLoadVideoInCell(mCellRef);
                }
            });
        }
    }

    protected final void g() {
        int v4_5;
        MediaInfo v0_3;
        boolean v6_1;
        MediaInfo v4_1;
        String v3_1;
        int[] v6;
        Context v4;
        String v0_2;
        TextView v3;
        int v13 = 5;
        int v12 = -3;
        boolean v1 = true;
        int v5 = View.GONE;
        super.g();
        this.mArticle = this.mCellRef.article;
        this.bc = -1;
        if (this.mArticle != null) {
            if (this.mArticleShareHelper != null) {
                CallbackCenter.addCallback(BaseAppData.callbackTypeFeedArticleUmeng, this.bx);
            }
            CallbackCenter.addCallback(BaseAppData.callbackTypeSpipeItemStateChanged, this.bw);
            this.bc = 2;
            this.mDelete.setOnClickListener(this.mDeleteOnClickListener);
            this.mRootView.setOnClickListener(this.bz);
            this.bn = this.mCellRef.f();
            this.mVideoStyle = this.mCellRef.videoStyle;
            this.bo = this.mArticle.k();
            boolean v0 = this.mCellRef.adId > 0 ? true : false;
            this.bp = v0;
            int v0_1 = this.mCellRef == null || (this.mCellRef.cellFlag & 128) != 128 ? 0 : 1;
            v0 = v0_1 == 0 || (this.bp) ? false : true;
            this.bm = v0;
            if (this.mInfoLayout.mAvatarLoader == null) {
                this.mInfoLayout.mAvatarLoader = this.mOneOrThreeItemAvatarLoader;
            }

            if ((this.mCellRef.f()) || this.mVideoStyle == v13) {
                this.mTitle.setVisibility(v5);
            } else {
                this.mTitle.setVisibility(View.VISIBLE);
                v3 = this.mTitle;
                v0_2 = this.mArticle.title;
                if (android.support.design.a.isTextEmpty(v0_2)) {
                    UIUtils.setVisibility(((View) v3), v5);
                } else {
                    v4 = this.mContext;
                    v6 = this.mCellRef.title;
                    AppData.isNightMode();
                    v3.setText(a(v4, v0_2, v6));
                    v0_1 = v3.getPaintFlags();
                    if (this.mArticle.userDislike) {
                        v3.setPaintFlags(v0_1 | 16);
                    }

                    v0 = this.mArticle.clickTimestamp <= 0 ? true : false;
                    v3.setEnabled(v0);
                    v3.requestLayout();
                }

                if (!this.bm) {
                } else {
                    this.u();
                    LinearLayout v7 = this.mTopSourceLayout;
                    ForeGroundImageView v8 = this.mTopSourceIcon;
                    TextView v9 = this.mTopSourceIconTv;
                    TextView v10 = this.mTopSourceText;
                    if (v8 == null || v9 == null || v10 == null || v7 == null) {
                        v0_1 = 0;
                    } else {
                        v3_1 = null;
                        v0_2 = android.support.design.a.j(this.mArticle.source);
                        v4_1 = this.mArticle.mediaInfo;
                        if (v4_1 != null) {
                            v3_1 = android.support.design.a.j(v4_1.avatarUrl);
                            if (android.support.design.a.isTextEmpty(v0_2)) {
                                v0_2 = android.support.design.a.j(v4_1.name);
                            }
                        }

                        if (android.support.design.a.isTextEmpty(v0_2)) {
                            ((ViewGroup) v7).setVisibility(v5);
                            v0_1 = 0;
                        } else {
                            if (android.support.design.a.isTextEmpty(v3_1)) {
                                v3_1 = android.support.design.a.j(this.mCellRef.sourceAvatar);
                            }

                            ((ViewGroup) v7).setVisibility(View.VISIBLE);
                            v6_1 = !android.support.design.a.isTextEmpty(this.mCellRef.sourceOpenUrl) ? true : false;
                            View.OnClickListener v4_2 = v6_1 ? this.bt : null;
                            v7.setOnClickListener(v4_2);
                            v7.setClickable(v6_1);
                            if (!android.support.design.a.isTextEmpty(v3_1)) {
                                v8.setVisibility(View.VISIBLE);
                                v9.setVisibility(v5);
                                this.mLargeItemAvatarLoader.loadAvatar(((ImageView) v8), v3_1);
                            } else {
                                v8.setVisibility(v5);
                                v9.setVisibility(View.VISIBLE);
                                v9.setText(v0_2.substring(0, 1));
                            }

                            v10.setText(((CharSequence) v0_2));
                            v0_1 = 1;
                        }
                    }

                    if (v0_1 == 0) {
                    } else {
                        UIUtils.setLayoutMargins(this.mTitle, v12, 0, v12, v12);
                    }
                }
            }

            label_71:
            this.ba = 0;
            if (this.mVideoStyle == v13) {
                this.ba = 3;
            } else if (this.mCellRef.f()) {
                if ((this.mCellRef.videoStyle == 3 || this.mCellRef.videoStyle == 6) && (this.mShowListDigg)) {
                    this.ba = 1;
                } else if ((this.mCellRef.videoStyle != 3 && this.mCellRef.videoStyle != 6 || (this.mShowListDigg)) && this.mCellRef.videoStyle != 4) {
                    if (this.mCellRef.videoStyle == 7) {
                        this.ba = 4;
                    } else {
                        if (this.mCellRef.videoStyle != v5 && this.mCellRef.videoStyle != 12) {
                            if (this.mCellRef.videoStyle == 9) {
                                this.ba = 6;
                            } else {
                            }
                        } else {
                            this.ba = v13;
                        }
                    }
                } else {
                    this.ba = 2;
                }
            }

            if (this.ba == 0) {
                this.mInfoLayout.setVisibility(View.VISIBLE);
                InfoLayout.Info v3_2 = InfoLayout.Info.acquireInfo();
                this.mInfoLayout.setDislikeOnClickListener(this.bA);
                this.mInfoLayout.setMoreActionClickListener(this.bB);
                this.c(v3_2);
                if (((BaseFeedVideoViewHolder) this).mCellRef.m()) {
                    v3_2.a |= 8;
                    v3_2.f = ((BaseFeedVideoViewHolder) this).aW.a(((BaseFeedVideoViewHolder) this).mCellRef.cateBehotTime * 1000);
                }

                this.a(v3_2);
                if (this.mCellRef.i()) {
                    v0_2 = this.mCellRef.infoDesc;
                    if (!android.support.design.a.isTextEmpty(v0_2)) {
                        v3_2.e = v0_2;
                        v3_2.a |= 2;
                    } else {
                        v0_1 = this.mArticle.commentCount;
                        if (this.aT == 4) {
                            v3_2.e = this.mContext.getString(com.ss.android.article.browser.R.string.s4) + android.support.design.a.c(this.mArticle.repinCount);
                            v3_2.a |= 2;
                        } else {
                            v3_2.e = android.support.design.a.c(v0_1) + this.mContext.getString(com.ss.android.article.browser.R.string.comment_prefix);
                            v3_2.a |= 2;
                        }
                    }
                }

                if (!this.mCellRef.f() && (this.mCellRef.n()) && !UIUtils.isVisible(this.mTopSourceLayout)) {
                    v0_2 = android.support.design.a.j(this.mArticle.source);
                    if (this.aT == 4) {
                        v0_2 = this.mContext.getString(com.ss.android.article.browser.R.string.rz) + String.valueOf(this.mCellRef.goDetailCount);
                    }

                    if (v0_2 == null) {
                    } else if (android.support.design.a.isTextEmpty(v0_2.trim())) {
                    } else {
                        if (this.mCellRef.o()) {
                            v4_1 = this.mArticle.mediaInfo;
                            if (v4_1 != null && !android.support.design.a.isTextEmpty(v4_1.avatarUrl)) {
                                v3_2.avatarUrl = android.support.design.a.j(v4_1.avatarUrl);
                            } else if (!android.support.design.a.isTextEmpty(this.mCellRef.sourceAvatar)) {
                                v3_2.avatarUrl = android.support.design.a.j(this.mCellRef.sourceAvatar);
                            }

                            v3_2.i = this.mCellRef.sourceIconStyle;
                            v3_2.a |= 128;
                        }

                        v3_2.a |= 1;
                        v3_2.d = v0_2;
                    }
                }

                if (this.mCellRef.p()) {
                    v3_2.a |= 4;
                    v3_2.g = this.mArticle.reason;
                }

                if (this.mCellRef.h()) {
                    v0_1 = this.mArticle.diggCount;
                    if (v0_1 > 0 && this.aT != 4) {
                        v3_2.k = android.support.design.a.c(v0_1) + this.mContext.getString(com.ss.android.article.browser.R.string.update_digg);
                        v3_2.a |= 512;
                    }
                }

                this.mInfoLayout.a(v3_2);
                ((ViewGroup.MarginLayoutParams) this.mInfoLayout.getLayoutParams()).topMargin = this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.e7);
            } else {
                if (this.ba == 1) {
                    this.initDiggInfoLayout();
                    this.mDiggInfoLayout.setVisibility(View.VISIBLE);
                    this.mDiggLayout.setText(android.support.design.a.c(this.mArticle.diggCount));
                    this.mBuryLayout.setText(android.support.design.a.c(this.mArticle.buryCount));
                    android.support.design.a.a(this.mCoverActionCommentCount, this.mArticle.commentCount);
                    v3 = this.mCoverActionCommentCount;
                    v0_1 = this.mArticle.isLiveVideo() ? v5 : 0;
                    UIUtils.setVisibility(((View) v3), v0_1);
                    this.mDiggLayout.setSelected(this.mArticle.userDigg);
                    this.mBuryLayout.setSelected(this.mArticle.userBury);
                    this.mDiggLayout.setOnClickListener(this.bG);
                    this.mBuryLayout.setOnClickListener(this.bG);
                    this.mCoverActionCommentCount.setOnClickListener(this.bG);
                    this.mCoverActionRepost.setOnClickListener(this.bG);
                } else if (this.ba == 4) {
                    this.m();
                    this.mDiggAuthorVideoLayout.setVisibility(View.VISIBLE);
                    v0_3 = this.mArticle.mediaInfo;
                    v3_1 = this.mCellRef.sourceAvatar;
                    if (v0_3 != null) {
                        UIUtils.setVisibility(this.mDiggAuthorVideoAuthorAvatar, v5);
                        UIUtils.setTextAndVisibility(this.mDiggAuthorAuthorName, v0_3.name);
                        if (this.mDiggAuthorAuthorName.getVisibility() == View.VISIBLE) {
                            this.mDiggAuthorAuthorName.setTextColor(ContextCompat.getColorStateList(this.mContext, com.ss.android.article.browser.R.color.ssxinzi2_selector));
                        }
                    } else if (!android.support.design.a.isTextEmpty(v3_1)) {
                        UIUtils.setVisibility(this.mDiggAuthorVideoAuthorAvatar, 0);
                        this.mLargeItemAvatarLoader.loadAvatar(this.mDiggAuthorVideoAuthorAvatar, v3_1);
                        UIUtils.setTextAndVisibility(this.mDiggAuthorAuthorName, this.mArticle.source);
                        if (this.mDiggAuthorAuthorName.getVisibility() == View.VISIBLE) {
                            this.mDiggAuthorAuthorName.setTextColor(ContextCompat.getColorStateList(this.mContext, com.ss.android.article.browser.R.color.yp));
                        }
                    } else {
                        UIUtils.setVisibility(this.mDiggAuthorVideoAuthorAvatar, v5);
                        UIUtils.setTextAndVisibility(this.mDiggAuthorAuthorName, this.mArticle.source);
                        if (this.mDiggAuthorAuthorName.getVisibility() == View.VISIBLE) {
                            this.mDiggAuthorAuthorName.setTextColor(ContextCompat.getColorStateList(this.mContext, com.ss.android.article.browser.R.color.yp));
                        }
                    }

                    if (!this.at.a(this.mCellRef, this.mArticle.aF, true)) {
                        UIUtils.setVisibility(this.an, 0);
                        UIUtils.setVisibility(this.ao, 0);
                        UIUtils.setVisibility(this.am, v5);
                        UIUtils.setVisibility(this.at, v5);
                        UIUtils.setVisibility(this.ap, 0);
                        UIUtils.setVisibility(this.ar, 0);
                        this.an.setSelected(this.mArticle.userDigg);
                        UIUtils.setLayoutMargins(this.an, 0, 0, ((int) UIUtils.dp2px(this.mContext, 20f)), 0);
                        this.ao.setSelected(this.mArticle.userBury);
                        android.support.design.a.a(this.ap, this.mArticle.commentCount);
                        v3 = this.ap;
                        v0_1 = this.mArticle.isLiveVideo() ? v5 : 0;
                        UIUtils.setVisibility(((View) v3), v0_1);
                        UIUtils.setVisibility(this.aq, 0);
                        this.ar.setImageResource(com.ss.android.article.browser.R.drawable.video_cover_comm_repost);
                        v0_1 = UIUtils.percentWidth(this.mContext, 0.0375f);
                        this.ar.setPadding(v0_1, 0, v0_1, 0);
                        UIUtils.setLayoutMargins(this.ar, 0, v12, v12, v12);
                        this.an.setOnClickListener(this.bG);
                        this.ao.setOnClickListener(this.bG);
                        this.ap.setOnClickListener(this.bG);
                        this.ar.setOnClickListener(this.bG);
                    } else {
                        UIUtils.setVisibility(this.an, v5);
                        UIUtils.setVisibility(this.ao, v5);
                        UIUtils.setVisibility(this.am, v5);
                        UIUtils.setVisibility(this.ap, v5);
                        UIUtils.setVisibility(this.ar, v5);
                        UIUtils.setVisibility(this.at, 0);
                        if (v0_3 != null) {
                        } else if (this.mArticle == null) {
                        } else if (this.mArticle.source == null) {
                        } else if (!android.support.design.a.isTextEmpty(v3_1)) {
                        } else {
                            UIUtils.setVisibility(this.mDiggAuthorAdAvatarTv, 0);
                            UIUtils.setText(this.mDiggAuthorAdAvatarTv, this.mArticle.source.substring(0, 1));
                            android.support.design.a.b(this.mDiggAuthorAdAvatarTv, this.mCellRef.sourceIconStyle);
                        }
                    }

                    this.ah.setOnClickListener(this.bu);
                    this.ah.setOnTouchListener(this.bv);
                    this.mDiggAuthorAuthorName.setOnClickListener(this.bu);
                    this.aJ.setOnClickListener(this.bF);
                    this.aH.setOnClickListener(this.bF);
                    this.aI.setOnClickListener(this.bF);
                    UIUtils.setLayoutMargins(this.mDivider, 0, v12, 0, v12);
                    if (this.mAppData.getAppSettings().isVideoCellChange()) {
                        UIUtils.setLayoutParams(this.mDivider, v12, ((int) UIUtils.dp2px(this.mContext, 5f)));
                    } else {
                        UIUtils.setLayoutParams(this.mDivider, v12, ((int) UIUtils.dp2px(this.mContext, 11f)));
                    }

                    this.mDivider.setBackgroundResource(com.ss.android.article.browser.R.color.ssxinxian1);
                    this.mDivider.setImageResource(com.ss.android.article.browser.R.color.ssxinmian3);
                    v0_1 = ((int) UIUtils.dp2px(this.mContext, 0.5f));
                    this.mDivider.setPadding(0, v0_1, 0, v0_1);
                } else if (this.ba == v13) {
                    this.m();
                    this.mDiggAuthorVideoLayout.setVisibility(View.VISIBLE);
                    v0_3 = this.mArticle.mediaInfo;
                    v3_1 = this.mCellRef.sourceAvatar;
                    if (!android.support.design.a.isTextEmpty(v3_1)) {
                        UIUtils.setVisibility(this.mDiggAuthorVideoAuthorAvatar, 0);
                        this.mLargeItemAvatarLoader.loadAvatar(this.mDiggAuthorVideoAuthorAvatar, v3_1);
                        UIUtils.setTextAndVisibility(this.mDiggAuthorAuthorName, this.mArticle.source);
                        if (this.mDiggAuthorAuthorName.getVisibility() == View.VISIBLE) {
                            this.mDiggAuthorAuthorName.setTextColor(ContextCompat.getColorStateList(this.mContext, com.ss.android.article.browser.R.color.yp));
                        }
                    } else if (v0_3 != null) {
                        String v4_3 = v0_3.avatarUrl;
                        if (!android.support.design.a.isTextEmpty(v4_3)) {
                            UIUtils.setVisibility(this.mDiggAuthorVideoAuthorAvatar, 0);
                            this.mLargeItemAvatarLoader.loadAvatar(this.mDiggAuthorVideoAuthorAvatar, v4_3);
                        } else {
                            UIUtils.setVisibility(this.mDiggAuthorVideoAuthorAvatar, v5);
                        }

                        UIUtils.setTextAndVisibility(this.mDiggAuthorAuthorName, v0_3.name);
                        if (this.mDiggAuthorAuthorName.getVisibility() != View.VISIBLE) {
                        } else {
                            this.mDiggAuthorAuthorName.setTextColor(ContextCompat.getColorStateList(this.mContext, com.ss.android.article.browser.R.color.yp));
                        }
                    } else {
                        UIUtils.setVisibility(this.mDiggAuthorVideoAuthorAvatar, v5);
                        UIUtils.setTextAndVisibility(this.mDiggAuthorAuthorName, this.mArticle.source);
                        if (this.mDiggAuthorAuthorName.getVisibility() != View.VISIBLE) {
                        } else {
                            this.mDiggAuthorAuthorName.setTextColor(ContextCompat.getColorStateList(this.mContext, com.ss.android.article.browser.R.color.yp));
                        }
                    }
                    if (!android.support.design.a.isTextEmpty(this.mCellRef.label)) {
                        this.mDiggAuthorAuthorName.setMaxWidth(((int) UIUtils.dp2px(this.mContext, 85f)));
                        UIUtils.setVisibility(this.ak, 0);
                        android.support.design.a.a(this.mContext, this.ak, this.mCellRef.labelStyle, this.mCellRef.label);
                    } else if (!android.support.design.a.isTextEmpty(this.mCellRef.adLabel)) {
                        this.mDiggAuthorAuthorName.setMaxWidth(((int) UIUtils.dp2px(this.mContext, 85f)));
                        UIUtils.setVisibility(this.ak, 0);
                        android.support.design.a.a(this.mContext, this.ak, this.mCellRef.labelStyle, this.mCellRef.adLabel);
                    } else {
                        UIUtils.setVisibility(this.ak, v5);
                    }

                    if (!this.at.a(this.mCellRef, this.mArticle.aF, true)) {
                        UIUtils.setVisibility(this.am, v5);
                        UIUtils.setVisibility(this.an, 0);
                        UIUtils.setVisibility(this.ao, v5);
                        android.support.design.a.a(this.ap, this.mArticle.commentCount);
                        v3 = this.ap;
                        v0_1 = this.mArticle.isLiveVideo() ? v5 : 0;
                        UIUtils.setVisibility(((View) v3), v0_1);
                        UIUtils.setVisibility(this.aq, v5);
                        UIUtils.setVisibility(this.ap, 0);
                        UIUtils.setVisibility(this.ar, 0);
                        UIUtils.setVisibility(this.at, v5);
                        this.ar.setImageResource(com.ss.android.article.browser.R.drawable.more_video_selector);
                        this.ar.setPadding(UIUtils.percentWidth(this.mContext, 0.015625f), 0, UIUtils.percentWidth(this.mContext, 0.046875f), 0);
                        UIUtils.setLayoutMargins(this.ar, ((int) UIUtils.dp2px(this.mContext, 3f)), v12, v12, v12);
                        this.ap.setOnClickListener(this.bG);
                        this.ar.setOnClickListener(this.bG);
                        this.ah.setOnClickListener(this.bu);
                        this.ah.setOnTouchListener(this.bv);
                        this.mDiggAuthorAuthorName.setOnClickListener(this.bu);
                        this.an.setSelected(this.mArticle.userDigg);
                        this.an.setText(String.valueOf(this.mArticle.diggCount));
                        UIUtils.setLayoutMargins(this.an, 0, 0, ((int) UIUtils.dp2px(this.mContext, 12f)), 0);
                        this.an.setOnClickListener(this.bG);
                        this.aJ.setOnClickListener(this.bF);
                        this.aH.setOnClickListener(this.bF);
                        this.aI.setOnClickListener(this.bF);
                    } else {
                        if (v0_3 == null && this.mArticle != null && this.mArticle.source != null && (android.support.design.a.isTextEmpty(v3_1))) {
                            UIUtils.setVisibility(this.mDiggAuthorAdAvatarTv, 0);
                            UIUtils.setText(this.mDiggAuthorAdAvatarTv, this.mArticle.source.substring(0, 1));
                            android.support.design.a.b(this.mDiggAuthorAdAvatarTv, this.mCellRef.sourceIconStyle);
                        }

                        if (android.support.design.a.isTextEmpty(this.mCellRef.adLabel)) {
                            UIUtils.setVisibility(this.ak, 0);
                            android.support.design.a.a(this.mContext, this.ak, this.mCellRef.labelStyle, "广告");
                        }

                        this.mDiggAuthorAuthorName.setMaxWidth(((int) UIUtils.dp2px(this.mContext, 150f)));
                        UIUtils.setVisibility(this.am, v5);
                        UIUtils.setVisibility(this.an, v5);
                        UIUtils.setVisibility(this.ao, v5);
                        UIUtils.setVisibility(this.ap, v5);
                        UIUtils.setVisibility(this.aq, v5);
                        UIUtils.setVisibility(this.ar, v5);
                        UIUtils.setVisibility(this.at, 0);
                        this.ah.setOnClickListener(this.bz);
                        this.mDiggAuthorAuthorName.setOnClickListener(this.bz);
                    }

                    UIUtils.setLayoutMargins(this.mDivider, 0, v12, 0, v12);
                    if (this.mAppData.getAppSettings().isVideoCellChange()) {
                        UIUtils.setLayoutParams(this.mDivider, v12, ((int) UIUtils.dp2px(this.mContext, 5f)));
                    } else {
                        UIUtils.setLayoutParams(this.mDivider, v12, ((int) UIUtils.dp2px(this.mContext, 11f)));
                    }

                    this.mDivider.setBackgroundResource(com.ss.android.article.browser.R.color.ssxinxian1);
                    this.mDivider.setImageResource(com.ss.android.article.browser.R.color.ssxinmian3);
                    v0_1 = ((int) UIUtils.dp2px(this.mContext, 0.5f));
                    this.mDivider.setPadding(0, v0_1, 0, v0_1);
                } else if (this.ba == 2) {
                    this.k();
                    this.mNoDiggInfoLayout.setVisibility(View.VISIBLE);
                    this.mVideoSourceInNoDigg.setText(this.mArticle.source);
                    this.mVideoDurationInNoDigg.setText(ArticleHelper.convert2ReadableString(this.mArticle.videoDuration));
                    UIUtils.setVisibility(this.mVideoCoverLayoutCoverSourceTv, v5);
                    UIUtils.setVisibility(this.mVideoCoverLayoutCoverDurationBtn, v5);
                    android.support.design.a.a(this.mVideoCommentInNoDigg, this.mArticle.commentCount);
                    v3 = this.mVideoCommentInNoDigg;
                    v0_1 = this.mArticle.isLiveVideo() ? v5 : 0;
                    UIUtils.setVisibility(((View) v3), v0_1);
                    this.mVideoCommentInNoDigg.setOnClickListener(this.bG);
                    this.mVideoRepostInNoDigg.setOnClickListener(this.bG);
                } else if (this.ba == 3) {
                    this.o();
                    this.mMoreCommentsDiggInfoLayoutHolder.mMoreCommentsDiggInfoLayout.setVisibility(View.VISIBLE);
                    UIUtils.setTextAndVisibility(this.mMoreCommentsDiggInfoLayoutHolder.mVideoTitle, this.mArticle.title);
                    v3 = this.mMoreCommentsDiggInfoLayoutHolder.mVideoTitle;
                    v0 = this.mArticle.clickTimestamp <= 0 ? true : false;
                    v3.setEnabled(v0);
                    this.mMoreCommentsDiggInfoLayoutHolder.mMultiVideoDiggLayout.setText(android.support.design.a.c(this.mArticle.diggCount));
                    this.mMoreCommentsDiggInfoLayoutHolder.mMultiVideoBuryLayout.setText(android.support.design.a.c(this.mArticle.buryCount));
                    android.support.design.a.a(this.mMoreCommentsDiggInfoLayoutHolder.mComment, this.mArticle.commentCount);
                    v3 = this.mMoreCommentsDiggInfoLayoutHolder.mComment;
                    v0_1 = this.mArticle.isLiveVideo() ? v5 : 0;
                    UIUtils.setVisibility(((View) v3), v0_1);
                    this.mMoreCommentsDiggInfoLayoutHolder.mMultiVideoDiggLayout.setSelected(this.mArticle.userDigg);
                    this.mMoreCommentsDiggInfoLayoutHolder.mMultiVideoBuryLayout.setSelected(this.mArticle.userBury);
                    this.mMoreCommentsDiggInfoLayoutHolder.mMultiVideoDiggLayout.setOnClickListener(this.bG);
                    this.mMoreCommentsDiggInfoLayoutHolder.mMultiVideoBuryLayout.setOnClickListener(this.bG);
                    this.mMoreCommentsDiggInfoLayoutHolder.mCommentWrapper.setOnClickListener(this.bG);
                    this.mMoreCommentsDiggInfoLayoutHolder.mMore.setOnClickListener(this.bG);
                    if (this.mArticle.comments == null || this.mArticle.comments.size() <= 0) {
                        this.mMoreCommentsDiggInfoLayoutHolder.mCommentsWrapper.setVisibility(v5);
                    } else {
                        this.mMoreCommentsDiggInfoLayoutHolder.mCommentsWrapper.setVisibility(View.VISIBLE);
                        this.mMoreCommentsDiggInfoLayoutHolder.mCommentsWrapper.setOnClickListener(this.bG);
                        Iterator v3_3 = this.mArticle.comments.iterator();
                        while (v3_3.hasNext()) {
                            Object v0_4 = v3_3.next();
                            if (v0_4 == null) {
                                continue;
                            }

                            if (android.support.design.a.isTextEmpty(((Comment) v0_4).text)) {
                                continue;
                            }

                            TextView v4_4 = BaseFeedViewHolder.MoreCommentsDiggInfoLayoutHolder.a(this.mContext);
                            SpannableStringBuilder v6_2 = new SpannableStringBuilder();
                            if (!android.support.design.a.isTextEmpty(((Comment) v0_4).userName)) {
                                String v7_1 = ((Comment) v0_4).userName + ":  ";
                                v6_2.append(((CharSequence) v7_1));
                                if (o == null) {
                                    o = new ForegroundColorSpan(ContextCompat.getColor(this.mContext, com.ss.android.article.browser.R.color.update_comment_more_text_selector));
                                }

                                v6_2.setSpan(o, 0, v7_1.length(), 33);
                            }

                            v6_2.append(((Comment) v0_4).text);
                            v4_4.setText(((CharSequence) v6_2));
                            this.mMoreCommentsDiggInfoLayoutHolder.mCommentsWrapper.addView(((View) v4_4));
                            this.mMoreCommentsDiggInfoLayoutHolder.k.add(v4_4);
                        }
                    }

                    if (!this.mCellRef.l) {
                    } else {
                        this.mMoreCommentsDiggInfoLayoutHolder.mDividerSpace.setVisibility(v5);
                        this.mMoreCommentsDiggInfoLayoutHolder.mDividerLine.setVisibility(v5);
                    }
                } else if (this.ba != 6) {
                } else {
                    this.initVideoSwitchInfosLayout();
                    v0_3 = this.mArticle.mediaInfo;
                    if (v0_3 != null) {
                        v3_1 = v0_3.avatarUrl;
                        if (!android.support.design.a.isTextEmpty(v3_1)) {
                            UIUtils.setVisibility(this.mSwichAvatar, 0);
                            this.mLargeItemAvatarLoader.loadAvatar(this.mSwichAvatar, v3_1);
                        } else {
                            UIUtils.setVisibility(this.mSwichAvatar, v5);
                        }

                        UIUtils.setTextAndVisibility(this.mSwitchName, v0_3.name);
                        this.mSwitchHeadNameInfos.setOnClickListener(this.bu);
                    } else {
                        UIUtils.setVisibility(this.mSwichAvatar, v5);
                        UIUtils.setTextAndVisibility(this.mSwitchName, this.mArticle.source);
                        this.mSwitchHeadNameInfos.setOnClickListener(null);
                    }

                    this.mSwitchVideoDigg.setSelected(this.mArticle.userDigg);
                    this.mSwitchVideoBury.setSelected(this.mArticle.userBury);
                    this.mSwitchVideoDigg.setText(android.support.design.a.c(this.mArticle.diggCount));
                    this.mSwitchVideoBury.setText(android.support.design.a.c(this.mArticle.buryCount));
                    this.mSwitchVideoCommentCount.setText(android.support.design.a.c(this.mArticle.commentCount), true);
                    DrawableButton v3_4 = this.mSwitchVideoCommentCount;
                    v0_1 = this.mArticle.isLiveVideo() ? v5 : View.VISIBLE;
                    UIUtils.setVisibility(((View) v3_4), v0_1);
                    this.mSwitchVideoDigg.setOnClickListener(this.bG);
                    this.mSwitchVideoBury.setOnClickListener(this.bG);
                    this.mSwitchVideoCommentCount.setOnClickListener(this.bG);
                    this.mSwitchVideoAction.setOnClickListener(this.bG);
                    this.mVideoSwitchInfosStub.setVisibility(v5);
                    UIUtils.setLayoutMargins(this.mDivider, 0, v12, 0, v12);
                    UIUtils.setLayoutParams(this.mDivider, v12, ((int) UIUtils.dp2px(this.mContext, 2f)));
                    this.mDivider.setBackgroundResource(com.ss.android.article.browser.R.color.ssxinmian4);
                }
            }

            label_162:
            v0_1 = (this.mCellRef.l) || (this.mCellRef.f()) || this.mVideoStyle == v13 ? 1 : 0;
            if (!this.mCellRef.l && (this.ba == 4 || this.ba == v13 || this.ba == 6)) {
                v0_1 = 0;
            }

            ImageView v3_5 = this.mDivider;
            v0_1 = v0_1 != 0 ? v5 : 0;
            v3_5.setVisibility(v0_1);
            if (this.mMoreCommentsDiggInfoLayoutHolder != null && this.mMoreCommentsDiggInfoLayoutHolder.mMultiVideoDiggLayout != null) {
                this.mMoreCommentsDiggInfoLayoutHolder.mMultiVideoDiggLayout.setDiggAnimationView(this.bh);
            }

            if (this.mMoreCommentsDiggInfoLayoutHolder != null && this.mMoreCommentsDiggInfoLayoutHolder.mMultiVideoBuryLayout != null) {
                this.mMoreCommentsDiggInfoLayoutHolder.mMultiVideoBuryLayout.setDiggAnimationView(this.bh);
                this.mMoreCommentsDiggInfoLayoutHolder.mMultiVideoBuryLayout.a(com.ss.android.article.browser.R.drawable.og, com.ss.android.article.browser.R.drawable.of, AppData.isNightMode());
            }

            if (this.mDiggLayout != null) {
                this.mDiggLayout.setDiggAnimationView(this.bh);
            }

            if (this.mBuryLayout != null) {
                this.mBuryLayout.setDiggAnimationView(this.bh);
                this.mBuryLayout.a(com.ss.android.article.browser.R.drawable.og, com.ss.android.article.browser.R.drawable.of, AppData.isNightMode());
            }

            if (this.an != null) {
                this.an.setDiggAnimationView(this.bh);
            }

            if (this.ao != null) {
                this.ao.setDiggAnimationView(this.bh);
                this.ao.a(com.ss.android.article.browser.R.drawable.og, com.ss.android.article.browser.R.drawable.of, AppData.isNightMode());
            }

            if (this.mSwitchVideoDigg != null) {
                this.mSwitchVideoDigg.setDiggAnimationView(this.bh);
            }

            if (this.mSwitchVideoBury != null) {
                this.mSwitchVideoBury.setDiggAnimationView(this.bh);
                this.mSwitchVideoBury.a(com.ss.android.article.browser.R.drawable.og, com.ss.android.article.browser.R.drawable.of, AppData.isNightMode());
            }

            v6_1 = this.bj.get();
            v0 = this.mCellRef.adId > 0 ? true : false;
            this.n();
            this.mLargeImageLayout.setVisibility(View.VISIBLE);
            this.mLargeImageLayout.setClickable(false);
            int v3_6 = -1;
            if (this.mCellRef.g()) {
                this.mLargeImageLayout.setOnClickListener(this.bH);
                switch (this.mCellRef.videoStyle) {
                    case 2: {
                        UIUtils.setVisibility(this.mLargeImageLayoutLargeImageVideoPlay, 0);
                        this.mLargeImageLayoutLargeImageVideoPlay.setOnClickListener(this.bH);
                        if (this.mArticle.isLiveVideo()) {
                            UIUtils.setVisibility(this.mLargeVideoTime, 0);
                            this.mLargeVideoTime.setDrawable(ContextCompat.getDrawable(this.mContext, com.ss.android.article.browser.R.drawable.live_video_tip), true);
                            this.mLargeVideoTime.setText(this.mContext.getString(com.ss.android.article.browser.R.string.live_video_tip), true);
                            this.mLargeImageLayoutLargeImageVideoPlay.setImageResource(com.ss.android.article.browser.R.drawable.media_pause_icon_live_selector);
                        } else {
                            if (this.mArticle.videoDuration > 0) {
                                this.mLargeVideoTime.setText(ArticleHelper.convert2ReadableString(this.mArticle.videoDuration), false);
                                this.mLargeVideoTime.setDrawable((Drawable) null, true);
                            }

                            if ((UIUtils.isVisible(this.mLargeVideoTime)) && this.mLargeVideoTime != null) {
                                this.mLargeVideoTime.setDrawable((Drawable) null, true);
                            }

                            this.mLargeImageLayoutLargeImageVideoPlay.setImageResource(com.ss.android.article.browser.R.drawable.playicon_video_selector);
                        }

                        this.mLargeButtonAd.a(this.mCellRef);
                        break;
                    }
                    case 5: {
                        this.l();
                        UIUtils.setVisibility(this.mVideoCoverLayout, 0);
                        if (this.FeedItemBehavior.contextType() != 1) {
                            this.mVideoCoverLayout.setBackgroundColor(0);
                        }

                        this.mVideoCoverLayoutCoverTitle.setVisibility(v5);
                        v3_1 = ArticleHelper.convert2ReadableString(this.mArticle.videoDuration);
                        if (this.mArticle.videoDuration == 0) {
                            this.mVideoCoverLayoutCoverDurationBtn.setVisibility(v5);
                        } else {
                            this.mVideoCoverLayoutCoverDurationBtn.setVisibility(View.VISIBLE);
                            this.mVideoCoverLayoutCoverDurationBtn.setText(v3_1, true);
                        }

                        if (this.mArticle.isLiveVideo()) {
                            UIUtils.setVisibility(this.mVideoCoverLayoutCoverDurationBtn, 0);
                            this.mVideoCoverLayoutCoverDurationBtn.setDrawable(android.support.design.a.getLiveVideoTipDrawable(this.mContext), true);
                            this.mVideoCoverLayoutCoverDurationBtn.setText(this.mContext.getString(com.ss.android.article.browser.R.string.live_video_tip), true);
                            this.mVideoCoverLayoutCoverPlayIcon.setImageResource(android.support.design.a.e(com.ss.android.article.browser.R.drawable.media_pause_icon_live_selector));
                        } else {
                            if (UIUtils.isVisible(this.mVideoCoverLayoutCoverDurationBtn)) {
                                this.mVideoCoverLayoutCoverDurationBtn.setDrawable((Drawable) null, true);
                            }

                            this.mVideoCoverLayoutCoverPlayIcon.setImageResource(android.support.design.a.e(com.ss.android.article.browser.R.drawable.playicon_video_selector));
                        }
                        v3_6 = ArticleHelper.getActualLargeImageHeight(this.mArticle.largeImageList, UIUtils.getScreenWidth(this.mContext), v0, this.aU);
                        this.mVideoCoverLayoutCoverSourceTv.setVisibility(v5);
                        this.mVideoCoverLayoutCoverButtonAd.a(this.mCellRef);
                        break;
                    }
                    case 3:
                    case 4:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 12: {
                        this.l();
                        UIUtils.setVisibility(this.mVideoCoverLayout, 0);
                        UIUtils.setTextAndVisibility(this.mVideoCoverLayoutCoverTitle, this.mArticle.title);
                        if (this.ba == v13 || this.ba == 4) {
                            this.mVideoCoverLayoutCoverTitle.setTextSize(16f);
                            this.mVideoCoverLayoutCoverTitle.setTextColor(ContextCompat.getColorStateList(this.mContext, com.ss.android.article.browser.R.color.ssxinzi10));
                        } else if (this.ba == 6) {
                            this.mVideoCoverLayoutCoverTitle.setTextSize(15f);
                            this.mVideoCoverLayoutCoverTitle.setLineSpacing(UIUtils.dp2px(this.mContext, 6f), 1f);
                        }

                        if (this.ba == 1 || this.ba == 4 || this.ba == v13) {
                            v3_1 = ArticleHelper.convert2ReadableString(this.mArticle.videoDuration);
                            if (this.mArticle.videoDuration == 0) {
                                this.mVideoCoverLayoutCoverDurationBtn.setVisibility(v5);
                            } else {
                                this.mVideoCoverLayoutCoverDurationBtn.setVisibility(View.VISIBLE);
                                this.mVideoCoverLayoutCoverDurationBtn.setText(v3_1, true);
                            }

                            this.mVideoCoverLayoutCoverButtonAd.a(this.mCellRef);
                        } else {
                            UIUtils.setVisibility(this.mVideoCoverLayoutCoverSourceTv, v5);
                            UIUtils.setVisibility(this.mVideoCoverLayoutCoverDurationBtn, v5);
                        }

                        if (this.ba == 6) {
                            this.t();
                            this.mVideoSwitchSoiurceInfosLayout.setVisibility(View.VISIBLE);
                            v3_1 = ArticleHelper.convert2ReadableString(this.mArticle.videoDuration);
                            if (this.mArticle.videoDuration == 0) {
                                this.mVideoDuration.setVisibility(v5);
                            } else {
                                this.mVideoDuration.setVisibility(View.VISIBLE);
                                this.mVideoDuration.setText(((CharSequence) v3_1));
                            }

                            this.mCommentCount.setText(android.support.design.a.c(this.mArticle.videoWatchCount) + this.mContext.getString(com.ss.android.article.browser.R.string.video_play_prefix) + "  " + android.support.design.a.c(this.mArticle.commentCount) + this.mContext.getString(com.ss.android.article.browser.R.string.comment_prefix));
                            UIUtils.setTextAndVisibility(this.mSwitchSource, this.mArticle.source);
                        }

                        if (this.FeedItemBehavior.contextType() != 1) {
                            this.mVideoCoverLayout.setBackgroundColor(0);
                        }

                        if (this.mArticle.isLiveVideo()) {
                            UIUtils.setVisibility(this.mVideoCoverLayoutCoverDurationBtn, 0);
                            this.mVideoCoverLayoutCoverDurationBtn.setDrawable(android.support.design.a.getLiveVideoTipDrawable(this.mContext), true);
                            this.mVideoCoverLayoutCoverDurationBtn.setText(this.mContext.getString(com.ss.android.article.browser.R.string.live_video_tip), true);
                            this.mVideoCoverLayoutCoverPlayIcon.setImageResource(com.ss.android.article.browser.R.drawable.media_pause_icon_live_selector);
                        } else {
                            if (UIUtils.isVisible(this.mVideoCoverLayoutCoverDurationBtn)) {
                                this.mVideoCoverLayoutCoverDurationBtn.setDrawable((Drawable) null, true);
                            }

                            this.mVideoCoverLayoutCoverPlayIcon.setImageResource(com.ss.android.article.browser.R.drawable.playicon_video_selector);
                        }

                        this.mVideoCoverLayoutCoverPlayIcon.setOnClickListener(this.bH);
                        v3_6 = ArticleHelper.getActualLargeImageHeight(this.mArticle.largeImageList, UIUtils.getScreenWidth(this.mContext), v0, this.aU);
                        if (!this.bp) {
                            break;
                        }

                        if (this.ba != 6) {
                            break;
                        }

                        if (this.mSwitchSource.getVisibility() == v5) {
                            this.mSwitchSource.setVisibility(View.VISIBLE);
                            this.mSwitchSource.setText("");
                        }

                        this.mSwitchSource.setCompoundDrawablesWithIntrinsicBounds(android.support.design.a.e(com.ss.android.article.browser.R.drawable.u7), 0, 0, 0);
                        break;
                    }
                }
                v4_5 = 1;
            } else {
                if (this.mArticle.h()) {
                    UIUtils.setVisibility(this.mLargeVideoTime, 0);
                    if (this.mArticle.videoDuration > 0) {
                        this.mLargeVideoTime.setText(ArticleHelper.convert2ReadableString(this.mArticle.videoDuration), true);
                    } else {
                        this.mLargeVideoTime.setText("", false);
                        this.mLargeVideoTime.a(com.ss.android.article.base.feature.app.a.b.i, true);
                    }

                    this.mLargeButtonAd.a(this.mCellRef);
                    if (this.mArticle.isLiveVideo()) {
                        this.mLargeVideoTime.setDrawable(android.support.design.a.getLiveVideoTipDrawable(this.mContext), true);
                        this.mLargeVideoTime.setText(this.mContext.getString(com.ss.android.article.browser.R.string.live_video_tip), true);
                        this.mLargeImageLayoutLargeImageVideoPlay.setImageResource(android.support.design.a.e(com.ss.android.article.browser.R.drawable.media_pause_icon_live_selector));
                        v4_5 = 0;
                    } else {
                        if (UIUtils.isVisible(this.mLargeVideoTime)) {
                            this.mLargeVideoTime.setDrawable((Drawable) null, true);
                        }
                        this.mLargeImageLayoutLargeImageVideoPlay.setImageResource(android.support.design.a.e(com.ss.android.article.browser.R.drawable.playicon_video_selector));
                        v4_5 = 0;
                    }
                } else {
                    v4_5 = 0;
                }
            }

            v0_1 = v3_6 < 0 ? ArticleHelper.getActualLargeImageHeight(this.mArticle.largeImageList, this.aV, v0, this.aU) : v3_6;
            UIUtils.setLayoutParams(this.mLargeImageLayoutLargeImageIv, v12, v0_1);
            UIUtils.setLayoutParams(this.mRelatedVideoContainer, v12, v0_1);
            if (this.mVideoCoverLayout != null && this.mVideoCoverLayout.getVisibility() == View.VISIBLE) {
                UIUtils.setLayoutParams(this.mVideoCoverLayout, v12, v0_1);
            }

            if (v4_5 != 0) {
                if (this.mVideoControllerContext != null) {
                    IVideoController videoController = this.mVideoControllerContext.getVideoController();
                    if (videoController != null && this.mArticle != null && videoController.getBindedTag() == this.mArticle && !android.support.design.a.isTextEmpty(this.mCellRef.category) && (this.mCellRef.category.equals(videoController.getCategory()))) {
                        this.mAppData.article = this.mArticle;
                        videoController.resumeMedia(this.mLargeImageLayoutLargeImageIv, this.mRelatedVideoContainer);
                        if (videoController.isPauseFromList()) {
                            videoController.continuePlay(false);
                        }
                    }
                }

                if (!android.support.design.a.isTextEquals(this.mAppData.g(this.mCellRef.category), this.mCellRef.cellId)) {
                } else if (this.mVideoStyle != 9) {
                } else {
                    UIUtils.setVisibility(this.mVideoSwitchInfosStub, 0);
                    this.w();
                    this.mDivider.setVisibility(v5);
                    b(this.mRootView);
                }
            }

            ArticleHelper.setVisible(this.mLargeImageLayoutLargeImageIv, this.mArticle.largeImageList);
            if ((this.mCellRef.f()) || this.mVideoStyle == v13) {
                ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) this.mLargeImageLayout.getLayoutParams();
                layoutParams.leftMargin = 0;
                layoutParams.rightMargin = 0;
                layoutParams.topMargin = 0;
            }

            if (!v6_1) {
                this.loadImage();
                this.bl = false;
            } else {
                this.bl = true;
            }

            if (this.mArticle == null || !this.h() || (this.mCellRef.f()) || this.mCellRef.videoStyle == v13) {
                UIUtils.setVisibility(this.mAbstractItem, v5);
            } else {
                v0_1 = this.mCellRef.title != null && this.mCellRef.title.length != 0 || (this.mCellRef._abstract == null || this.mCellRef._abstract.length <= 0) ? 0 : 1;
                v3_1 = null;
                AppData.x();
                v0_2 = v0_1 != 0 || (this.mCellRef.q()) ? this.mArticle._abstract : v3_1;
                if (!android.support.design.a.isTextEmpty(v0_2)) {
                    this.initAbstractCommentLayout();
                    this.mAbstractCommentLayout.setVisibility(View.VISIBLE);
                    v3 = this.mAbstractItem;
                    v4 = this.mContext;
                    v6 = this.mCellRef._abstract;
                    AppData.isNightMode();
                    v3.setText(a(v4, v0_2, v6));
                    TextView v0_7 = this.mAbstractItem;
                    if (this.mArticle.clickTimestamp > 0) {
                        v1 = false;
                    }

                    v0_7.setEnabled(v1);
                    UIUtils.setVisibility(this.mAbstractItem, 0);
                } else {
                    UIUtils.setVisibility(this.mAbstractItem, v5);
                }
            }

            this.B();
            if (this.mEntityLayout != null && this.mEntityLayout.getVisibility() != v5) {
                if (this.mAbstractCommentLayout != null && this.mAbstractCommentLayout.getVisibility() == View.VISIBLE) {
                    UIUtils.setLayoutMargins(this.mAbstractCommentLayout, v12, v12, v12, 0);
                } else if (this.mInfoLayout == null) {
                } else if (this.mInfoLayout.getVisibility() != View.VISIBLE) {
                } else {

                    UIUtils.setLayoutMargins(this.mInfoLayout, v12, v12, v12, 0);
                }
            }

            this.w();
            if (this.mAbstractCommentLayout == null) {
                return;
            }

            if (this.mAbstractCommentLayout.getVisibility() == v5) {
                return;
            }

            if (this.mAbstractItem.getVisibility() != v5) {
                return;
            }

            if (this.mAbstractCommentContent.getVisibility() != View.VISIBLE) {
                return;
            }

            ((ViewGroup.MarginLayoutParams) this.mAbstractCommentContent.getLayoutParams()).topMargin = 0;
        }
    }

    public final void onMovedToScrapHeap() {
        super.onMovedToScrapHeap();
        if (this.mAppData.getAbSettings().isVideoListShare()) {
            if (this.be) {
                boolean v4 = ToolUtils.isAppInstalled(this.mContext, "com.tencent.mobileqq");
                UIUtils.setVisibility(this.aG, 8);
                UIUtils.setVisibility(this.aI, 8);
                UIUtils.setVisibility(this.aH, 8);
                UIUtils.setVisibility(this.aJ, 8);
                int v3 = v4 ? 82 : 43;
                int v2 = v4 ? 43 : 4;
                int v1 = v4 ? 114 : 75;
                int v0 = v4 ? 4 : 0;
                Animator v4_1 = AccountAnimatorHelper.createFadeInAnimation(this.mDiggAuthorVideoAuthorAvatar);
                Animator v5 = AccountAnimatorHelper.createFadeInAnimation(this.mDiggAuthorAuthorName);
                Animator v6 = AccountAnimatorHelper.createFadeOutAnimation(this.aG);
                Animator v7 = AccountAnimatorHelper.createFadeOutAnimation(this.aH);
                Animator v8 = AccountAnimatorHelper.createFadeOutAnimation(this.aI);
                Animator v9 = AccountAnimatorHelper.createFadeOutAnimation(this.aJ);
                Animator v1_1 = AccountAnimatorHelper.createTranslationXAnimator(this.aG, 0, ((int) UIUtils.dp2px(this.mContext, ((float) v1))));
                Animator v0_1 = AccountAnimatorHelper.createTranslationXAnimator(this.aH, 0, ((int) UIUtils.dp2px(this.mContext, ((float) v0))));
                Animator v3_1 = AccountAnimatorHelper.createTranslationXAnimator(this.aI, 0, ((int) UIUtils.dp2px(this.mContext, ((float) v3))));
                Animator v2_1 = AccountAnimatorHelper.createTranslationXAnimator(this.aJ, 0, ((int) UIUtils.dp2px(this.mContext, ((float) v2))));
                Animator v10 = AccountAnimatorHelper.createTranslationXAnimator(this.an, (((int) UIUtils.dp2px(this.mContext, 15f))) - this.br, 0);
                Animator v11 = AccountAnimatorHelper.createTranslationXAnimator(this.ap, (((int) UIUtils.dp2px(this.mContext, 76f))) - this.bs, 0);
                AnimatorSet v12 = new AnimatorSet();
                v12.playTogether(new Animator[]{v4_1, v5, v6, v7, v8, v9, v1_1, v0_1, v3_1, v2_1, v10, v11});
                v12.setInterpolator(android.support.design.a.a(0.32f, 0.94f, 0.6f));
                v12.setDuration(0);
                v12.start();
                this.bs = 0;
                this.br = 0;
                this.bf = 2;
                this.be = false;
            } else {
                this.bf = 1;
            }
        }

        this.mRootView.setOnClickListener(null);
        if (this.mArticleShareHelper != null) {
            CallbackCenter.removeCallback(BaseAppData.callbackTypeFeedArticleUmeng, this.bx);
        }

        CallbackCenter.removeCallback(BaseAppData.callbackTypeSpipeItemStateChanged, this.bw);
        if (this.mArticle != null && (this.mArticle.f())) {
            this.mNetworkMonitor.isNetworkOn();
        }

        this.bl = false;
        if (this.mArticle != null && (this.mArticle.userDislike)) {
            this.mTitle.setPaintFlags(this.mTitle.getPaintFlags() & -17);
        }

        UIUtils.setVisibility(this.mTitle, 0);
        if (this.bc != -1) {
            if (this.mEntityLayout != null && this.mEntityLayout.getVisibility() != View.GONE) {
                if (this.mAbstractCommentLayout != null && this.mAbstractCommentLayout.getVisibility() == View.VISIBLE) {
                    UIUtils.setLayoutMargins(this.mAbstractCommentLayout, -3, -3, -3, this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.feed_item_vertical_margin));
                } else if (this.mInfoLayout == null) {
                } else if (this.mInfoLayout.getVisibility() != View.VISIBLE) {
                } else {
                    UIUtils.setLayoutMargins(this.mInfoLayout, -3, -3, -3, this.mContext.getResources().getDimensionPixelOffset(com.ss.android.article.browser.R.dimen.feed_info_layout_margin_bottom));
                }
            }

            if (this.mAbstractCommentLayout != null && this.mAbstractCommentLayout.getVisibility() != View.GONE) {
                if (this.mAbstractItem.getVisibility() == View.GONE && this.mAbstractCommentContent.getVisibility() == View.VISIBLE) {
                    ((ViewGroup.MarginLayoutParams) this.mAbstractCommentContent.getLayoutParams()).topMargin =
                            this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.a1);
                }

                this.mAbstractCommentLayout.setVisibility(View.GONE);
                this.mAbstractCommentContent.setOnClickListener(null);
            }

            this.A();
            if (this.mEntityLayout != null && this.mEntityLayout.getVisibility() != View.GONE) {
                this.mEntityLayout.setOnClickListener(null);
                this.mEntityLike.setOnClickListener(null);
                this.mEntityLayout.setVisibility(View.GONE);
            }

            if (this.bc != 2) {
                return;
            }

            if (this.bn) {
                UIUtils.setVisibility(this.mVideoCoverLayoutCoverTopShadow, 8);
                UIUtils.setVisibility(this.mVideoCoverLayoutCoverBottomShadow, 8);
            }

            android.support.design.a.removeImageInfoTag(mLargeImageLayoutLargeImageIv);
            if (mLargeImageLayoutLargeImageIv != null) {
                mLargeImageLayoutLargeImageIv.setImageDrawable(null);
            }
        }
    }

    final void onDeleteClick() {
        if (this.mCellRef != null && this.mArticle != null) {
            this.mArticle.userRepin = false;
            --this.mArticle.repinCount;
            if (this.mArticle.repinCount < 0) {
                this.mArticle.repinCount = 0;
            }

            this.mArticleActionHelper.a(5, this.mArticle, this.mCellRef.adId);
            this.FeedItemBehavior.onDeleteFavorClick(this.mCellRef);
        }
    }

    final void w() {
        int v2;
        int v9 = 33;
        int v4 = View.GONE;
        if (!this.i() || this.mVideoStyle == 5) {
            label_22:
            UIUtils.setVisibility(this.mAbstractCommentContent, v4);
        } else {
            if (this.mVideoStyle == 9) {
                if (this.mVideoSwitchInfosStub == null) {
                } else if (this.mVideoSwitchInfosStub.getVisibility() != v4) {
                } else {
                    UIUtils.setVisibility(this.mAbstractCommentContent, v4);
                    return;
                }
            }

            if (this.mEntityLayout != null && this.mEntityLayout.getVisibility() == View.VISIBLE) {
                UIUtils.setVisibility(this.mAbstractCommentContent, v4);
                return;
            }

            AppData.isNightMode();
            int v0 = this.mArticle.comment != null ? 1 : 0;
            if (v0 == 0) {
                UIUtils.setVisibility(this.mAbstractCommentContent, v4);
                return;
            }

            this.initAbstractCommentLayout();
            this.mAbstractCommentContent.setOnClickListener(this.by);
            this.mAbstractCommentLayout.setVisibility(View.VISIBLE);
            UIUtils.setVisibility(this.mAbstractCommentContent, 0);
            this.mAbstractCommentContent.setOnClickListener(this.by);
            Comment v4_1 = this.mArticle.comment;
            StringBuilder v5 = new StringBuilder();
            if (!android.support.design.a.isTextEmpty(v4_1.userName)) {
                v2 = v5.length();
                v5.append(v4_1.userName);
                v0 = v5.length();
                if (v4_1.userVerified) {
                    v5.append("v");
                }

                v5.append(": ");
            } else {
                v0 = 0;
                v2 = 0;
            }

            if (v4_1.text != null) {
                v5.append(v4_1.text);
            }

            if (v0 > 0) {
                SpannableString v6 = new SpannableString(v5.toString());
                v6.setSpan(new ForegroundColorSpan(this.mResources.getColor(com.ss.android.article.browser.R.color.update_comment_more_text_selector)), v2, v0, v9);
                if (v4_1.userVerified) {
                    v6.setSpan(new com.ss.android.article.base.ui.k(this.mContext), v0, v0 + 1, v9);
                }

                this.mAbstractCommentContent.setText(((CharSequence) v6));
            } else {
                this.mAbstractCommentContent.setText(v5.toString());
            }

            v0 = this.mArticle.clickTimestamp <= 0 ? 1 : 0;
            TextView v2_1 = this.mAbstractCommentContent;
            Resources v4_2 = this.mContext.getResources();
            v0 = v0 != 0 ? com.ss.android.article.browser.R.color.ssxinzi1 : com.ss.android.article.browser.R.color.bw;
            v2_1.setTextColor(v4_2.getColor(v0));
            if (this.bc != 2) {
                return;
            }

            if (!this.mCellRef.f()) {
                return;
            }

            this.a(this.ba, true);
            this.mAbstractCommentContent.setPadding(0, 0, 0, this.mContext.getResources().getDimensionPixelSize(com.ss.android.article.browser.R.dimen.e6));
            this.mAbstractCommentContent.setBackgroundResource(0);
            ((ViewGroup.MarginLayoutParams) this.mAbstractCommentLayout.getLayoutParams()).bottomMargin = 0;
        }
    }

    final JSONObject x() {
        int v0_1;
        JSONObject v1 = new JSONObject();
        try {
            v1.put("source", this.FeedItemBehavior.getCategoryName());
            if (this.mArticle.entityStyle == 2) {
                v0_1 = 1;
            } else {
                v0_1 = 0;
            }
            v1.put("like", v0_1);
            v1.put("item_id", this.mArticle.itemId);
            v1.put("keyword", this.mArticle.entityWord);
        } catch (JSONException v0) {
            Logger.throwExceptionInDebug(((Throwable) v0));
        }

        return v1;
    }

    public final void onPlayIconClick() {
        if (this.mVideoControllerContext != null) {
            IVideoController controller = this.mVideoControllerContext.getVideoController();
            if (controller == null) {
                return;
            }
            if (this.mArticle == null) {
                return;
            }
            if (controller.getBindedTag() == this.mArticle) {
                if (!controller.isVideoPlaying()) {
                    return;
                } else if (!controller.isPatchVideo()) {
                    return;
                } else {
                    controller.handlePatchRootViewClick();
                }
            }

            if (this.mCellRef.article != null && this.mCellRef.a() && this.mCellRef.article.groupId > 0 && this.mCellRef.adId > 0) {
                JSONObject jsonObject = null;
                try {
                    if (!android.support.design.a.isTextEmpty(this.mCellRef.logExtra)) {
                        jsonObject = new JSONObject();
                        jsonObject.put("log_extra", this.mCellRef.logExtra);
                    }
                } catch (Exception e) {
                }
                MobClickCombiner.onEvent(this.mContext, "embeded_ad", "click", this.mCellRef.adId, 0, jsonObject);
            }

            if (!NetworkUtils.isNetworkAvailable(this.mContext)) {
                UIUtils.showImageToast(this.mContext, com.ss.android.article.browser.R.drawable.close_popup_textpage, com.ss.android.article.browser.R.string.net_unvailable);
                return;
            }

            if (NetworkUtils.isWifi(this.mContext) || this.mAppData.userAllowUseMobileNet) {
                this.playVideo();
            } else {
                AlertDialog.Builder builder = com.ss.android.j.b.createDialogBuilder(this.mContext);
                long adId = -1;
                long groupId = -1;
                if (this.mCellRef != null) {
                    adId = this.mCellRef.getAdId();
                    Article article = this.mCellRef.article;
                    if (article != null) {
                        groupId = article.groupId;
                    }
                }
                builder.setMessage(com.ss.android.article.browser.R.string.video_mobile_play_dlg_content);
                final long finalGroupId = groupId;
                final long finalAdId = adId;
                builder.setPositiveButton(com.ss.android.article.browser.R.string.video_mobile_play, new DialogInterface.OnClickListener() {
                    public final void onClick(DialogInterface dialog, int which) {
                        FeedVideoViewHolder.this.mAppData.userAllowUseMobileNet = true;
                        FeedVideoViewHolder.this.playVideo();
                        MobClickCombiner.onEvent(mContext, "video", "net_alert_confirm", finalGroupId, finalAdId);
                    }
                });
                builder.setNegativeButton(com.ss.android.article.browser.R.string.video_mobile_stop, new DialogInterface.OnClickListener() {

                    public final void onClick(DialogInterface dialog, int which) {
                        MobClickCombiner.onEvent(mContext, "video", "net_alert_cancel", finalGroupId, finalAdId);
                    }
                });
                MobClickCombiner.onEvent(mContext, "video", "net_alert_show", groupId, adId);
                builder.setCancelable(false);
                builder.show();
                return;
            }
        }
    }

    final void playVideo() {
        if (this.mVideoControllerContext != null) {
            IVideoController videoController = this.mVideoControllerContext.getVideoController();
            if (videoController != null && this.mArticle != null && videoController.getBindedTag() != this.mArticle) {
                this.mVideoControllerContext.initVideoView();
                this.mAppData.article = this.mArticle;
                videoController.play(this.mCellRef,
                        this.aV,
                        this.mLargeImageLayoutLargeImageIv.getHeight(),
                        this.mLargeImageLayoutLargeImageIv,
                        this.mRelatedVideoContainer, false);
                videoController.setPlayCompleteListener(this.mPlayCompleteListener);
                videoController.setShareListener(this.mShareListener);
            }
        }
    }
}

